null in foreach fix
This commit is contained in:
parent
8c8b19f391
commit
f769508984
|
@ -201,7 +201,7 @@ class views extends core
|
|||
$buffer = [];
|
||||
|
||||
// Обработка последних просмотров
|
||||
foreach ($response as $view) $buffer[] = $view->getAll()[0];
|
||||
foreach ($response ?? [] as $view) $buffer[] = $view->getAll()[0];
|
||||
|
||||
return $buffer;
|
||||
} else throw new exception('Не удалось инициализировать коллекцию');
|
||||
|
|
Loading…
Reference in New Issue