I'm getting this error on my localhost/test site that's connected to our live Acquia Search index (read-only):
Warning: Illegal string offset 'service_class' in acquia_search_environment_connected() (line 204 of /Users/lrobeson/Sites/hcl/sites/all/modules/acquia_connector/acquia_search/acquia_search.module).
Here's the backtrace leading up to it:
[0] => Array
(
[file] => /Users/lrobeson/Sites/hcl/includes/errors.inc
[line] => 253
[function] => drupal_set_message
[args] => Array
(
[0] => Warning: Illegal string offset 'service_class' in acquia_search_environment_connected() (line 204 of /Users/lrobeson/Sites/hcl/sites/all/modules/acquia_connector/acquia_search/acquia_search.module).
[1] => error
)
)
[1] => Array
(
[file] => /Users/lrobeson/Sites/hcl/includes/errors.inc
[line] => 90
[function] => _drupal_log_error
[args] => Array
(
[0] => Array
(
[%type] => Warning
[!message] => Illegal string offset 'service_class'
[%function] => acquia_search_environment_connected()
[%file] => /Users/lrobeson/Sites/hcl/sites/all/modules/acquia_connector/acquia_search/acquia_search.module
[%line] => 204
[severity_level] => 4
)
[1] =>
)
)
[2] => Array
(
[file] => /Users/lrobeson/Sites/hcl/includes/bootstrap.inc
[line] => 2247
[function] => _drupal_error_handler_real
[args] => Array
(
[0] => 2
[1] => Illegal string offset 'service_class'
[2] => /Users/lrobeson/Sites/hcl/sites/all/modules/acquia_connector/acquia_search/acquia_search.module
[3] => 204
[4] => Array
(
[environment] => acquia_search_server_1
)
)
)
[3] => Array
(
[file] => /Users/lrobeson/Sites/hcl/sites/all/modules/acquia_connector/acquia_search/acquia_search.module
[line] => 204
[function] => _drupal_error_handler
[args] => Array
(
[0] => 2
[1] => Illegal string offset 'service_class'
[2] => /Users/lrobeson/Sites/hcl/sites/all/modules/acquia_connector/acquia_search/acquia_search.module
[3] => 204
[4] => Array
(
[environment] => acquia_search_server_1
)
)
)
[4] => Array
(
[file] => /Users/lrobeson/Sites/hcl/sites/all/modules/acquia_connector/acquia_search/acquia_search.module
[line] => 478
[function] => acquia_search_environment_connected
[args] => Array
(
[0] => acquia_search_server_1
)
)
Comments
Comment #1
cpliakas commentedHi lrobeson.
What version of Apache Solr Search Integration are you using, and do you have any $conf overrides in settings.php related to Apache Solr Search Integration?
Thanks,
Chris
Comment #2
OldAccount commentedThe Apache Solr Search module is 7.x-1.1, no Solr-related $conf overrides in our settings file. This happened on a newly created test environment though, and I ran into a couple other database issues stemming from the PHP config not matching the live site (it was 5.4 instead of 5.3, among a couple other inconsistencies). Once I got the PHP configured correctly, this issue went away. So, my point is, I don't know how valid this issue is anymore.
Comment #3
cpliakas commentedThanks for reporting back!
Doing a quick search and based the info you provided, it seems like this could be a bug in the module when used with PHP 5.4 that should be fixed. Specifically, PHP 5.4 will throw this error for the code below:
5.3 will run this code happily with no errors. Let's keep this issue open and see if someone can replicate with PHP 5.4.
Thanks for posting,
Chris
Comment #4
OldAccount commentedAhh, makes sense. Well good, glad it wasn't a waste of your time after all. :)
Comment #5
joshmillerConfirmed, replicated with PHP 5.4.10, running locally, message non-existent on production server (hosted by Acquia cloud). Also seeing this error (similar):
Warning: Illegal string offset 'env_id' in acquia_search_environment_connected() (line 207 of sites/all/modules/acquia_connector/acquia_search/acquia_search.module).Josh
Comment #6
cpliakas commentedBumping up in priority since I can still confirm this bug and PHP 5.4 is stable and gaining popularity.
Comment #7
nick_vhHmm, so let's see if we can run the simpletests on php 5.4 and check what errors we recieve
Comment #8
PatchRanger commentedChances are that this bug of Apache Solr Search Integration (http://drupal.org/project/apachesolr) is related (could be a solution since it has a patch): #1978404: Illegal string offset warnings with PHP 5.4.
Comment #9
stanislav mixnovich commentedI can't reproduce.
Drupal 7.41
Acquia Connector 7.x-2.15
Search API 7.x-1.16
Apache Solr Search 7.x-1.7
PHP 5.4.45
Comment #10
PatchRanger commentedIt is not reproducible because #1978404: Illegal string offset warnings with PHP 5.4 is fixed, I guess ;)