Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

HHVM compatibility: func_get_args #372

Merged
merged 1 commit into from

3 participants

@javer

All func_get_args() calls have been moved to the top of the methods because HHVM doesn't keep a copy of the original args for performance reasons.

See facebook/hhvm#1027 for details.

@javer javer HHVM compatibility: func_get_args
All func_get_args() calls have been moved to the top of the methods
because HHVM doesn't keep a copy of the original args for performance
reasons.

See facebook/hhvm#1027 for details.
7540295
@doctrinebot
Collaborator

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DBAL-608

We use Jira to track the state of pull requests and the versions they got
included in.

@guilhermeblanco guilhermeblanco merged commit 8f119ee into doctrine:master

1 check passed

Details default The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 15, 2013
  1. @javer

    HHVM compatibility: func_get_args

    javer authored
    All func_get_args() calls have been moved to the top of the methods
    because HHVM doesn't keep a copy of the original args for performance
    reasons.
    
    See facebook/hhvm#1027 for details.
This page is out of date. Refresh to see the latest.
View
4 lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php
@@ -220,14 +220,14 @@ public function getIterator()
*/
public function fetch($fetchMode = null)
{
+ $args = func_get_args();
$fetchMode = $fetchMode ?: $this->defaultFetchMode;
if (isset(self::$fetchMap[$fetchMode])) {
return sqlsrv_fetch_array($this->stmt, self::$fetchMap[$fetchMode]);
} else if ($fetchMode == PDO::FETCH_OBJ || $fetchMode == PDO::FETCH_CLASS) {
$className = null;
$ctorArgs = null;
- if (func_num_args() >= 2) {
- $args = func_get_args();
+ if (count($args) >= 2) {
$className = $args[1];
$ctorArgs = (isset($args[2])) ? $args[2] : array();
}
View
8 lib/Doctrine/DBAL/Query/QueryBuilder.php
@@ -743,8 +743,8 @@ public function where($predicates)
*/
public function andWhere($where)
{
- $where = $this->getQueryPart('where');
$args = func_get_args();
+ $where = $this->getQueryPart('where');
if ($where instanceof CompositeExpression && $where->getType() === CompositeExpression::TYPE_AND) {
$where->addMultiple($args);
@@ -776,8 +776,8 @@ public function andWhere($where)
*/
public function orWhere($where)
{
- $where = $this->getQueryPart('where');
$args = func_get_args();
+ $where = $this->getQueryPart('where');
if ($where instanceof CompositeExpression && $where->getType() === CompositeExpression::TYPE_OR) {
$where->addMultiple($args);
@@ -869,8 +869,8 @@ public function having($having)
*/
public function andHaving($having)
{
- $having = $this->getQueryPart('having');
$args = func_get_args();
+ $having = $this->getQueryPart('having');
if ($having instanceof CompositeExpression && $having->getType() === CompositeExpression::TYPE_AND) {
$having->addMultiple($args);
@@ -892,8 +892,8 @@ public function andHaving($having)
*/
public function orHaving($having)
{
- $having = $this->getQueryPart('having');
$args = func_get_args();
+ $having = $this->getQueryPart('having');
if ($having instanceof CompositeExpression && $having->getType() === CompositeExpression::TYPE_OR) {
$having->addMultiple($args);
Something went wrong with that request. Please try again.