AI settings form fails to load when allowed_hosts is an empty string
I discovered this when running a custom code calling the LLM with an html string containing links. It checked against hosts allowed in the ai config. The error: ``` [error] TypeError: Cannot assign string to property Drupal\ai\Service\HostnameFilter::$allowedDomains of type ?array in Drupal\ai\Service\HostnameFilter->getAllowedDomains() (line 219 of /var/www/html/web/modules/contrib/ai/src/Service/HostnameFilter.php) #0 /var/www/html/web/modules/contrib/ai/src/Service/HostnameFilter.php(585): Drupal\ai\Service\HostnameFilter->getAllowedDomains() ``` This also stopped the AI setting form to load at `/admin/config/ai/settings` I noticed that for some reason my site had an empty string for the `allowed_hosts`. A hook was supposed to set the value to an empty array but failed because the configuration variable had a value (in this case the empty string). So I believe that the hook ai_update_13005 was not properly checking the existing value of `allowed_hosts` . Line 139: ``` if (!isset($settings['allowed_hosts'])) { ``` should have been ``` if (!isset($settings['allowed_hosts']) || empty($settings['allowed_hosts'])) { ```
issue