From d774e1cf6e750ca050aaac85435d0ad2a306b96a Mon Sep 17 00:00:00 2001 From: mirzaev Date: Thu, 4 Jan 2024 23:59:05 +0700 Subject: [PATCH] if there are only 1 last visitors fix --- mirzaev/site/repression/system/models/views.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mirzaev/site/repression/system/models/views.php b/mirzaev/site/repression/system/models/views.php index 5a0a394..01a3d95 100755 --- a/mirzaev/site/repression/system/models/views.php +++ b/mirzaev/site/repression/system/models/views.php @@ -200,6 +200,9 @@ class views extends core // Инициализация буфера обработанных последних просмотров $buffer = []; + // Универсализация + if ($response instanceof _document) $response = [$response]; + // Обработка последних просмотров foreach ($response ?? [] as $view) $buffer[] = $view->getAll()[0];