]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commit
fix(ERP-245): prevent TypeError when Domru XML has single count element
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Fri, 27 Feb 2026 21:38:15 +0000 (00:38 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Fri, 27 Feb 2026 21:38:15 +0000 (00:38 +0300)
commiteba3e63ed567aeba7cd1547c067681a7000569f8
treec51df5efa4462479dfa7e2027bc0c66e1cfbbe1f
parentd3b23edf3c50add5137fbc428682b5e13e65ab3a
fix(ERP-245): prevent TypeError when Domru XML has single count element

When XML response contains only one count element, json_decode(json_encode($xml))
produces a flat array instead of nested, causing $arr to be a string.
Skip non-array entries to avoid "Cannot access offset of type string on string".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
erp24/api1/views/cron/domru-cams.php