I have Drupal 7 with all core updates and all module updates current. On May 27, 2017, I installed protected_node 7.x-1.3. Before I finished the update process, my site crashed. All I can see on any page is the following error message:
Parse error: syntax error, unexpected '[' in /home/content/13/10151313/html/sites/all/modules/protected_node/protected_node.module on line 1514
I looked at the line in question and it appears to be properly formed.
I deleted the folder for protected_node from the website and my site will come back up, although with errors about not having protected_node. I don't use this a whole lot on the site, but I probably have two or three pages which use the module.
I attempted to reinstall the module through the module administration area but had the same results.
Am I missing something?
Comment | File | Size | Author |
---|---|---|---|
#6 | protected_node-fix_crash_old_php-2881988-6.patch | 688 bytes | tostinni |
Comments
Comment #2
GrimreaperHello,
What is your PHP version?
Comment #3
jwickwire CreditAttribution: jwickwire commentedPHP version 5.3.24
Comment #4
GrimreaperHello @jwickwire,
I think your PHP version does not support preparing an array and passing it as a function parameter directly.
As you are on an unsupported PHP version, see: http://php.net/supported-versions.php, and even Drupal 7 recommand PHP 5.4 as a minimum https://www.drupal.org/docs/7/system-requirements/php, please update your PHP (to 5.6.*).
If after updating your PHP version you still got an error, feel free to post a comment and I will re-open the issue.
Comment #5
jwickwire CreditAttribution: jwickwire commentedThanks so much for the help. Got it working.
Comment #6
tostinni CreditAttribution: tostinni at Agence Propal commented@Grimreaper, I agree that D7 requirements recommends PHP 5.4 but 5.2 and 5.3 are supposed to be supported even if they're in EOL.
So can we implement a simple fix like this to keep this compatibility ?
Thanks a lot.
Comment #8
GrimreaperHello,
The patch has been merged.
New release 7.x-1.4 is available: https://www.drupal.org/project/protected_node/releases/7.x-1.4