• Resolved herculesdesign

    (@herculesdesign)


    Hi,
    After updating, I have the following error:

    Parse error: syntax error, unexpected ‘?’ in /wp-content/plugins/redux/redux-core/framework.php on line 717

    Instead of this line

    public function get_instance(): ?ReduxFramework {

    I think it should be

    public function get_instance() {

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Kev Provance

    (@kprovance)

    If your version of PHP is lower than 7.1, you’ll need to upgrade it. PHP 7.1 is the required minimum. WordPress suggests a minimum of version 7.4.

    Thread Starter herculesdesign

    (@herculesdesign)

    Thanks for the answer but the server is running on php 7.4.22.
    I’m not a programmer but isn’t this a php syntax error adding a question mark in this line of code:

    public function get_instance(): ?ReduxFramework {

    Plugin Author Kev Provance

    (@kprovance)

    It’s a Nullable Type. It mean the return value accepts the specific object or a null as a return value and was added in PHP 7.0. Please go to your WordPress Site Health screen and verify through that interface the version of PHP running. In rare cases, the .htaccess can set an older version of PHP

    Thread Starter herculesdesign

    (@herculesdesign)

    Here are the details from the Redux – Health Report page:

    Server Environment
    Server Info: Apache
    Localhost Environment: –>
    PHP Version: 7.4.22
    ABSPATH: /home4/janourah/public_html/
    PHP Memory Limit : 256 MB
    PHP Post Max Size : 516 MB
    PHP Time Limit: 30
    PHP Max Input Vars : 1000
    PHP Display Errors : –
    SUHOSIN Installed: –
    MySQL Version: 5.7.23
    Max Upload Size: 512 MB

    I will contact the server support.

    Plugin Author Kev Provance

    (@kprovance)

    I’n consulting with other devs on this, as it makes no sense at all.

    Please go into the functions.php of your project. At the beginning, add:

    phpinfo();
    die();

    I’m only interested in the PHP version data, including possible CLI, fpm, and apache.

    Once you have this, you can remove those lines.

    Thread Starter herculesdesign

    (@herculesdesign)

    At this LINK you will find all php info.

    Plugin Author Kev Provance

    (@kprovance)

    I’m at a loss. This defines logic. PHP should not not reject syntax it claims to support.

    I can try your theme on my end. I know it’s premium, so if you want to use something like wetransfer.com to send it to me, I can take a look. You’ll need my email address to do so. It’s [email protected]

    Thread Starter herculesdesign

    (@herculesdesign)

    Oh no ! Don’t kill me Kavin, but I confused my clients because two of them had different problems with the Redux plugin at the same time. It turned out that the person who had this problem
    Parse error: syntax error, unexpected ‘?’ In /wp-content/plugins/redux/redux-core/framework.php on line 717
    was actually using php 7.0.

    I’m really sorry and thank you for taking care of this.

    Plugin Author Kev Provance

    (@kprovance)

    I…pardon you. ??

    I *knew* it was old PHP!! I’m glad this was all cleared up.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Syntax error’ is closed to new replies.