From: Aleksey Filippov Date: Fri, 27 Feb 2026 22:06:19 +0000 (+0300) Subject: fix(ERP-245): add is_array check to second foreach in domru-cams X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=2440862383f4a73373e141897d1a0dea7d2aa6c0;p=erp24_rep%2Fyii-erp24%2F.git 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 --- 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"]);