if there are only 1 last visitors fix
This commit is contained in:
@@ -200,6 +200,9 @@ class views extends core
|
|||||||
// Инициализация буфера обработанных последних просмотров
|
// Инициализация буфера обработанных последних просмотров
|
||||||
$buffer = [];
|
$buffer = [];
|
||||||
|
|
||||||
|
// Универсализация
|
||||||
|
if ($response instanceof _document) $response = [$response];
|
||||||
|
|
||||||
// Обработка последних просмотров
|
// Обработка последних просмотров
|
||||||
foreach ($response ?? [] as $view) $buffer[] = $view->getAll()[0];
|
foreach ($response ?? [] as $view) $buffer[] = $view->getAll()[0];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user