Commit 8f119eea authored by Guilherme Blanco's avatar Guilherme Blanco

Merge pull request #372 from javer/hhvm-func_get_args

HHVM compatibility: func_get_args
parents ed7c1c0b 75402954
......@@ -220,14 +220,14 @@ class SQLSrvStatement implements IteratorAggregate, Statement
*/
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();
}
......
......@@ -743,8 +743,8 @@ class QueryBuilder
*/
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 @@ class QueryBuilder
*/
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 @@ class QueryBuilder
*/
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 @@ class QueryBuilder
*/
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment