rev 422 incompatible with older versions of php

Bug #1542036 reported by Nicholas Skaggs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu QA Website
Triaged
Low
Unassigned

Bug Description

It appears the syntax introduced in r422 is invalid:

[Thu Feb 04 01:54:39 2016] [error] [client 91.189.90.30] PHP Parse
error: syntax error, unexpected '[' in
/srv/drupal-qa-tracker/www/bzr/new/modules/qawebsite/qawebsite.module on
line 25

The site runs precise, which uses PHP 5.3.10-1ubuntu3.21, so it's
possible you've used a feature of later PHPs that isn't available under 5.3.

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

I rolled this back in rev425, which is in prod now. Would be nice to actually fix.

Changed in ubuntu-qa-website:
assignee: nobody → Matthew Allen (whosdaz)
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Matthew Allen (whosdaz) wrote :

I've check the syntax for the line it's reffering to qawebsite.module:25
   $pathmain = explode("/", $path)[0];

I checked this through a syntax checker, and had a look at this method was introduced in PHP4, so It shouldn't be an issue.
Is there potential that it was stuffed up when being merged?

Not 100% sure on this one.

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

I'm not sure, I can only report about what happened. I agree, it doesn't make sense persay, but it is what actually happened :-) We'll need to test on precise if we want to try and recreate / fix.

Matthew Allen (whosdaz)
Changed in ubuntu-qa-website:
assignee: Matthew Allen (whosdaz) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.