Finder::getCollectionFromResults doesn't check hydrateFromGrouped's return result is not null

Status
This content is read-only, or is not open for further replies.

Xon

Guest
offline
PHP:

Code:
while ($row = $results->fetchAliasGrouped())
{
    $entity = $this->em->hydrateFromGrouped($row, $map);
    $id = $keyedBy ? $keyedBy($entity) : $entity->getIdentifier();

Tracing from hydrateFromGrouped, instantiateEntity can return null which may cause hydrateFromGrouped to return null in a wonky edge case. That will make the call to Entity::getIdentifier() fail and really doesn't make any sense to pass to $keyedBy which probably expects the argument...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom