• Resolved mbsharp

    (@mbsharp)


    Can I reactivate the previous report that there is a parse error when activating the current version of the plugin.
    Unexpected ‘[‘ in ewz-base.php at line 116
    Using PHP 5.5.35 and WP 4.5.2.
    The previous resolution suggested this parse error should not occur in PHP versions from 5.4, but I found it with PHP 5.2, 5.4 and now with 5.5

    https://www.ads-software.com/plugins/entrywizard/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Josie Stauffer

    (@joanne123)

    I’m now running 5.6, so can’t check easily. Apologies if I got it wrong — I probably read some documentation and did not check the php version it applied to.

    I’m working on a new version of entrywizard with a few small improvements. I will change the offending line to something that should be better supported. It should be out within a few days to a week or so.

    For now, I’d suggest you edit the file classes/ewz-base.php, and change line 116 from
    $this->$key = (object)[];
    to
    $this->$key = new stdClass();

    ( If you have never edited code before, do be sure that your editor saves it as plain text. )

    Or your other option would be to go to php 5.6

    Thread Starter mbsharp

    (@mbsharp)

    I fixed it.
    I changed the code line as suggested and activation then failed claiming I was not up to PHP level 5.4
    Although I had requested a change to PHP5.5 via my hosting service console, my WP folder has an .htaccess file and that had an environment setting for PHP 53.
    I reverted the hosting console to 5.4, and edited the .htaccess file to 54, and the plugin activated with the original code.

    Plugin Author Josie Stauffer

    (@joanne123)

    Good to hear.

    5.4 is the level I had set as required. I hadn’t realized that even my code that checks for the PHP version would not run with that line in place.

    I’ll change it in the next version.

    Thread Starter mbsharp

    (@mbsharp)

    Your code to check the PHP level did work correctly.
    I changed the line in ewz-base.php so the parse error didn’t occur. But the activation then reported the requirement for PHP5.4
    The problem was that I had asked the hosting system to use PHP5.4 (actually 5.5), but my original WordPress installation had inserted (in my local installation) an environment setting for 5.3 which I didn’t know about.

    Once I had changed the environment setting, and put ewz-base.php back to its release state, the activation worked fine.

    I wonder how many others may have a setting hidden in an .htaccess file that they don’t know about.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Parse error activating 1.2.19’ is closed to new replies.