Issue Bug Closed

#54312Logical error in indexer task

Alexander Stehlik 12/10/13, 21:59 updated 10/23/17, 21:46

Description

In the processChangedAndNewFiles() method in the Indexer class there seems to be a logical error which causes a fatal PHP error because an invalid call to getFileObject().

At the beginning there is a check:

if ($data == NULL) {

The data variable is not modified and then passed to the getFileObject() method:

$fileObject = $this->getResourceFactory()->getFileObject($data['uid'], $data);

Since data is NULL and does obviously not contain a UID this method call fails.

As far as I can see the code needs to look like that:

$fileObject = $this->getResourceFactory()->getFileObject($fileIndexEntry['uid'], $fileIndexEntry);

Reviews 1