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

  • Thread starter Thread starter Xon
  • Start date Start date
There is a bug in this version
X

Xon

Guest
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...