From b33c9befb7390565c5f9f7d43967ced32a6ae67c Mon Sep 17 00:00:00 2001 From: Alex Bakhturin Date: Fri, 17 Oct 2014 11:17:33 -0700 Subject: [PATCH] [QueryBuilder] Remove unused method parameters that are shadowed by local variables PHP5 treats the left part of such assignment as an independent local variable, while HHVM treats it as a reference to the method parameter. This leads to the value of the parameter being changed, which, in turn, causes func_get_args() to return not what is expected. This commit is a part of the effort to make Symfony run flawlessly on HHVM. This issue causes a bunch of Symfony tests to fail on HHVM. --- lib/Doctrine/ORM/QueryBuilder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/QueryBuilder.php b/lib/Doctrine/ORM/QueryBuilder.php index a530d3bb0..36dc2d7fe 100644 --- a/lib/Doctrine/ORM/QueryBuilder.php +++ b/lib/Doctrine/ORM/QueryBuilder.php @@ -1026,7 +1026,7 @@ class QueryBuilder * * @see where() */ - public function andWhere($where) + public function andWhere() { $args = func_get_args(); $where = $this->getDQLPart('where'); @@ -1059,7 +1059,7 @@ class QueryBuilder * * @see where() */ - public function orWhere($where) + public function orWhere() { $args = func_get_args(); $where = $this->getDqlPart('where');