cf0e9ad2bc
EspoCRM returns JSON data as stdClass objects, not arrays. Using array access ($data[$i]['role']) on stdClass causes fatal error. Fixed by using json_decode(json_encode(...), true) to ensure deep conversion to associative arrays. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>