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 .

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

PatchRanger’s picture

Status: Active » Needs review
FileSize
943 bytes

Reason

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 is admin/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.

pwolanin’s picture

looks reasonable to me

jantoine’s picture

Issue tags: +needs backport to 6.x

Having the same issue with 6.x.

pwolanin’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
FileSize
608 bytes

thanks committed. Here's a possible 6.x backport

The last submitted patch, 1978404-4.patch, failed testing.

PatchRanger’s picture

Status: Needs work » Needs review

#4: 1978404-4.patch queued for re-testing.

PatchRanger’s picture

Issue summary: View changes

Correct link to orginal

Michelle’s picture

Issue summary: View changes
Issue tags: +PHP 5.4

(tagging)

pwolanin’s picture

Anyone verify this fixes the issue with that branch?