Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Some tests, like the OpenID module's OpenIDRegistrationTestCase in openid.test, have only a simple function name in the result function property. So this line
list($class, $name) = explode('->', $result->function, 2);
produces the error
Notice: Undefined offset: 1 in simpletest_script_reporter_write_xml_results() (line 616 of /path/to/docroot/scripts/run-tests.sh).
Comment | File | Size | Author |
---|---|---|---|
#2 | simpletest-undefined-offset-2877081-1.patch | 737 bytes | brad.bulger |
Comments
Comment #2
brad.bulger CreditAttribution: brad.bulger commentedOf the variables being defined by that line of code, only one is used, and only in the subsequent line:
$case->setAttribute('name', $name);
So we can use an array variable instead of the list() assignment and avoid the error.
Comment #3
brad.bulger CreditAttribution: brad.bulger commented