-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
In ApiController::actionSearch() the try/catch block is placed around code that will not throw an exception ever - the actual Exception coming from $fileSystem->get() is never catched / ignored.
So the search crashes, if there is a FileflyHashmap record which references a file that does not exists
` foreach ($query->all() as $item) {
// check read permissions or is folder
if (!$fileSystem->grantAccess($item['path'],
Filefly::ACCESS_READ) || $fileSystem->get($item['path'])->isDir()) {
continue;
}
try {
$item['id'] = $item['path'];
$item['mime'] = '';
$result[] = $item;
} catch (FileNotFoundException $e) {
\Yii::warning($e->getMessage(), __METHOD__);
continue;
}
}`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels