• Resolved Imagedkilgoesc13

    (@dkilgoesc13)


    After updating to 1.4.1, I can’t log into my site and see this error in my php.log
    [20-Sep-2017 13:58:30] PHP Parse error: syntax error, unexpected T_FUNCTION in /xxxxxxx/wp-content/plugins/disable-json-api/classes/disable-rest-api.php on line 86

    /**
    * Checks a route for whether it belongs to the whitelist
    *
    * @param $currentRoute
    *
    * @return boolean
    */
    private function is_whitelisted( $currentRoute ) {

    return array_reduce( $this->get_route_whitelist_option(), function ( $isMatched, $pattern ) use ( $currentRoute ) {
    return $isMatched || (bool) preg_match( ‘@^’ . htmlspecialchars_decode( $pattern ) . ‘$@i’, $currentRoute );
    }, false );

    }

    I looks like this plugin is now using closures which aren’t compatible with my really old php install. (5.2.x)

    Could you make use of the recently added php version feature and note which php versions are supported?

    https://wptavern.com/wordpress-org-now-allows-plugin-authors-to-specify-a-minimum-php-version-requirement

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

The topic ‘PHP Parse error: syntax error, unexpected T_FUNCTION in’ is closed to new replies.