Problem
I am getting a couple of illegal string offset warnings with PHP 5.4.13 whilst with PHP 5.3.10 everything is fine. See original warning messages here: https://travis-ci.org/Staratel/apachesolr/builds/6596744#L152 .
Reason
It looks related to another issue with similar module: #1824476: Illegal string offset 'service_class' in acquia_search_environment_connected(), take a look at http://drupal.org/node/1824476#comment-6673446 and http://drupal.org/node/1824476#comment-7270184 .
Comment | File | Size | Author |
---|---|---|---|
#4 | 1978404-4.patch | 608 bytes | pwolanin |
#1 | apachesolr-illegal_string_offset_warnings_with_PHP_5.4-1978404-1.patch | 943 bytes | PatchRanger |
Comments
Comment #1
PatchRanger CreditAttribution: PatchRanger commentedReason
After some investigation it became clear that the problem is that in 'Solr Search Environments' test case we are checking for a notice appearing that the server is offline at the page that doesn't exist: we are looking for
admin/config/search/apachesolr/search-pages
, which is missing due to disabled apachesolr_search module, it is triggering default page load (which isadmin/config/search/apachesolr
) - and fails because its $environment variable is not empty, but doesn't have 'env_id' and others either: see http://drupalcode.org/project/apachesolr.git/blob/refs/heads/7.x-1.x:/ap... .Please note that this bug only occurs in PHP since 5.4 because of stricter typization: in earlier versions of PHP this bug exists too but doesn't appear as a warning because it is silently suppressed.
Solution
Just enable apachesolr_search during testing - as it is supposed to be.
Comment #2
pwolanin CreditAttribution: pwolanin commentedlooks reasonable to me
Comment #3
jantoine CreditAttribution: jantoine commentedHaving the same issue with 6.x.
Comment #4
pwolanin CreditAttribution: pwolanin commentedthanks committed. Here's a possible 6.x backport
Comment #6
PatchRanger CreditAttribution: PatchRanger commented#4: 1978404-4.patch queued for re-testing.
Comment #6.0
PatchRanger CreditAttribution: PatchRanger commentedCorrect link to orginal
Comment #7
Michelle(tagging)
Comment #8
pwolanin CreditAttribution: pwolanin as a volunteer commentedAnyone verify this fixes the issue with that branch?