RSS Feed/News Finder::getCollectionFromResults doesn't check hydrateFromGrouped's return result is not null

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
30,182
Points
823

Reputation:

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...
 
Status
Not open for further replies.
Top