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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jwickwire created an issue. See original summary.

Grimreaper’s picture

Hello,

What is your PHP version?

jwickwire’s picture

PHP version 5.3.24

Grimreaper’s picture

Status: Active » Closed (works as designed)

Hello @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.

jwickwire’s picture

Thanks so much for the help. Got it working.

tostinni’s picture

Status: Closed (works as designed) » Needs review
FileSize
688 bytes

@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.

  • Grimreaper committed f1cebba on 7.x-1.x authored by tostinni
    Issue #2881988 by tostinni, jwickwire, Grimreaper: Update module in...
Grimreaper’s picture

Status: Needs review » Fixed

Hello,

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

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.