While using the AI API Explorer module, a PHP warning is triggered when provider configuration values contain arrays.
Error:
Warning: Array to string conversion in Drupal\ai_api_explorer\AiApiExplorerPluginBase->addProviderCodeExample()
Cause:
In AiApiExplorerPluginBase::addProviderCodeExample(), the code assumes non-string values can be directly concatenated into a string. However, when $value is an array, PHP throws an "Array to string conversion" warning.
Steps to Reproduce
- Go to this path /admin/config/ai/explorers/chat_generator
- Provide some chat message
- Click Ask AI button
Comments
Comment #5
revathi.b commentedMR !1427 fix this warning.
Comment #6
marcus_johansson commentedThank you for finding and fixing the issue. LGTM
Comment #7
marcus_johansson commentedComment #8
marcus_johansson commentedMerged everywhere.