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.
Problem/Motivation
/admin/config/development/testing returns a 500 Internal Server Error due to scheduler.test:
PHP Parse error: syntax error, unexpected '[', expecting ')' in sites/all/modules/contrib/scheduler/scheduler.test
Proposed resolution
Change
// Create a published node without scheduling.
$published_node = $this->drupalCreateNode(['type' => 'page', 'status' => 1]);
to work in PHP 5.3
Comment | File | Size | Author |
---|---|---|---|
#2 | php_5_3_issue_on-2722355-2.patch | 601 bytes | Novitsh |
Comments
Comment #2
Novitsh CreditAttribution: Novitsh at Colruyt Group Services commentedComment #3
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedHi Novitsh,
Thank you for raising this. Yes that new test was added in #2651344: Change unavailable_after meta tag to HTTP Header X-Robots-Tag which was initially at 8.x then the test was back-ported to 7.x
I am going to change the continual testing on 7.x to also run PHP5.3 in addition to 5.4 so that this error will be detected before committing.
Jonathan
Comment #4
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedThe main 'issue and commit' test is now chnaged to php5.3 and sure enough on https://dispatcher.drupalci.org/job/default/129181/console we get:
I have just added a retest of your patch at php5.3
Comment #6
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedThe re-test at php5.3 shows that your patch fixed the problem and that there were no other errors at 5.3. The continuous testing will now trap anything not valid at 5.3
Patch to commit in 29 minutes :-)
Thanks very much.