fix: stdClass as array error in ConversationRepository

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>
This commit is contained in:
2026-04-03 14:33:25 +00:00
parent 07df19b412
commit cf0e9ad2bc
3 changed files with 5 additions and 8 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
"module": "SmartAssistant",
"description": "Unified AI Assistant for Legal CRM — floating chat with case memory, office alerts, and n8n integration",
"author": "klear",
"version": "1.1.5",
"version": "1.1.6",
"acceptableVersions": [
">=8.0.0"
],