• Resolved erum1973

    (@erum1973)


    I just upgraded the plugin to version 2.0.0 and immediately I got the mentioned syntax error on the following function in Options.php:

    public function get_option( $option_name )
    {
    if (! $this->has_option( $option_name ) ) {
    return $this->get_defaults()[$option_name];
    }

    return $this->options[$option_name];
    }

    Line 38 is the then statement there in the middle.

    https://ww.wp.xz.cn/plugins/php-code-for-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jamie Fraser

    (@thejfraser)

    Hi Erum!

    Good Catch.

    It looks like an incompatibility with the version of PHP you are using.

    I’m pushing a fix now which should correct the issue.

    I’ve tested this on 5.5.8 and 5.6.17.

    cheers

    Heh, just found the same issue and got here 🙂

    Looking forward to resolution.

    Best,

    S.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Parse error: syntax error, unexpected '[' in ./Classes/Options.php on line 38’ is closed to new replies.