mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3317: [GH-1142] func_get_args() call order fix for HHVM bug #4100
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Sep 22, 2014).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of TwoWholeWorms:
Url: https://github.com/doctrine/doctrine2/pull/1142
Message:
This PR fixes bugs in
Doctrine\ORM\QueryBuilderwhere the values provided to method arguments to::andWhere(),::orWhere(),::andHaving(), and::orHaving()are overwritten by code within the methods in HHVM and PHP7.After much fun and headscratching in both #doctrine and #hhvm on Freenode, we discovered that in the following code,
$where = $this->getDqlPart('where');overwrites the values stored internally for the$whereparameter of the function which is returned byfunc*get*args():This means that instead of
$argsbeing set as expected to an array containing the string or object provided to the function, it actually contains the object returned byQueryBuilder::getDqlPart(), which causes all the problems you'd expect it to.This PR simply swaps the order of the calls so that the function arguments are retrieved via
func*get*args()before the$wherevariable is modified, fixing the problem.@doctrinebot commented on GitHub (Sep 22, 2014):
@doctrinebot commented on GitHub (Sep 22, 2014):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1142] was closed:
https://github.com/doctrine/doctrine2/pull/1142
@doctrinebot commented on GitHub (Sep 22, 2014):
Issue was closed with resolution "Fixed"