mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
PHP Warning \Doctrine\ORM\QueryBuilder::where #7325
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 @mmross on GitHub (Feb 16, 2024).
Bug Report (PHP Warning)
Summary
After upgrading to doctrine/orm 3.0.0 we found PHP Warnings.
PHP Warning: Undefined array key 0 in /var/www/html/vendor/doctrine/orm/src/QueryBuilder.php on line 954
Current behavior
Inside of the where method
the value of $predicates is in this example an array like this
And this logic will throw the php warning.
Expected behavior
No PHP Warnings
It would be better to check that this value is an array and that key exists with the php method array_key_exists.
I can prepare a solution for this if I don't overlook anything about using the where method.