New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error on PHP < PHP v5.4 #938

Closed
krumch opened this Issue Apr 24, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@krumch

krumch commented Apr 24, 2016

s2M 160423: Fatal error in /var/www/.../httpdocs/blog/wp-includes/functions.php on line 3722 Parse error: syntax error, unexpected '[' in /var/www/.../httpdocs/blog/wp-content/plugins/s2member/includes/classes/cache.inc.php on line 56

@jaswrks

This comment has been minimized.

Member

jaswrks commented Apr 24, 2016

Thank you for the heads up! :-) @krumch

It looks like some PHP v5.4 compatible code found its way into the latest release by mistake, probably as a result of code formatting having been applied inadvertenly. I will get this corrected asap. If anyone is looking for an immediate quick-fix, here are two ways:

  • Upgrade to PHP v5.4+.

  • Or, change this line to the following for PHP v5.2+ compatibility. See also aed319e

    $links = array('login_welcome_page' => '', 'membership_options_page' => '', 'file_download_limit_exceeded_page' => '');

    Note the difference between array() (PHP v5.2+ compatible) and [] (PHP v5.4+ compatible).

@jaswrks

This comment has been minimized.

Member

jaswrks commented Apr 24, 2016

Next Release Changelog:

  • (s2Member/s2Member Pro) PHP Compat./Bug Fix: This follow-up release includes a patch that will prevent fatal errors when s2Member and/or s2Member Pro are installed on a site running PHP v5.2 or PHP v5.3; i.e., this release corrects a bug that was causing fatal errors on these older versions of PHP. Note that s2Member and s2Member Pro are once again compatible with PHP v5.2+, up to PHP v7.0. Props @krumch. See also: this GitHub issue for details.

@jaswrks jaswrks closed this Apr 24, 2016

@jaswrks jaswrks added this to the Next Release milestone Apr 24, 2016

@jaswrks jaswrks self-assigned this Apr 24, 2016

@jaswrks jaswrks changed the title from Fatal error on PHP 5.3.29 and 5.3.3 to Fatal error on PHP < PHP v5.4 Apr 24, 2016

@jaswrks

This comment has been minimized.

Member

jaswrks commented Apr 24, 2016

s2Member & s2Member Pro v160424 have been released and they include changes from this GitHub Issue. See the v160424 announcement for further details.


This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one. Thanks! :-)

@websharks websharks locked and limited conversation to collaborators Apr 24, 2016

@raamdev raamdev reopened this Nov 15, 2016

@raamdev

This comment has been minimized.

Contributor

raamdev commented Nov 29, 2016

s2Member v161129 has been released and includes changes from this GitHub Issue. See the v161129 announcement for further details.


This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#938).

@raamdev raamdev closed this Nov 29, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.