You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this made me wonder, why does this part returns NULL while the Collection interface indicates it should return a boolean? Is returning the element/null on purpose?
The text was updated successfully, but these errors were encountered:
holtkamp
changed the title
PersistentCollection::removeElement() returns object instead of boolean
PersistentCollection::removeElement() returns object or NULL instead of boolean
Mar 30, 2016
When using strict typing in PHP 7.0.4:
declare (strict_types = 1);
, I noticed that an error is returned for userland code likeThis results in an error message like:
I had a look at all
removeElement()
functions used in the project and I suspect this sectionWill try to come up with a test but already wanted to register this issue so I will not forget it.
UPDATE
It appears that this can be tested in ExtraLazyCollectionTest::testRemoveElementManyToMany():
However, this made me wonder, why does this part returns
NULL
while the Collection interface indicates it should return aboolean
? Is returning the element/null on purpose?The text was updated successfully, but these errors were encountered: