From 2440862383f4a73373e141897d1a0dea7d2aa6c0 Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Sat, 28 Feb 2026 01:06:19 +0300 Subject: [PATCH] fix(ERP-245): add is_array check to second foreach in domru-cams Same TypeError fix for the second foreach loop that inserts data into store_visitors table. Co-Authored-By: Claude Opus 4.6 --- erp24/api1/views/cron/domru-cams.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erp24/api1/views/cron/domru-cams.php b/erp24/api1/views/cron/domru-cams.php index 6c0c6d70..9e78fbcd 100644 --- a/erp24/api1/views/cron/domru-cams.php +++ b/erp24/api1/views/cron/domru-cams.php @@ -210,6 +210,9 @@ if ($sid == null) { // вносим в массив foreach ($maas["count"] ?? [] as $id => $arr) { + if (!is_array($arr)) { + continue; + } if (isset($revers[$arr["CameraName"]])) { $store_id = $revers[$arr["CameraName"]]; $date_ar = explode(" ", $arr["DateTime"]); -- 2.39.5