• Resolved sunrisemario

    (@sunrisemario)


    Ok, tried to activate the plugin and wp says it cant intall it because of this failure:

    Parse error: syntax error, unexpected ‘?’ in /home/mywebsitename/public_html/wp-content/plugins/host-webfonts-local/includes/admin/class-settings.php on line 482

    so i looked in class-settings.php on line 482 and there it is:
    $items = $xml->channel->item ?? [];

    should i remove an “?” or something to let it go through?
    (I use the theme enfold.)

    thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Haha, no, don’t remove a question mark. The double question marks (??) That’s a null coalescing operator.

    I’m pretty sure you’re using an outdated PHP version. Which version are you running? Make sure it’s 7.0 or up.

    Thread Starter sunrisemario

    (@sunrisemario)

    thank’s Daan for your fast response!

    ok i dont touch the marks for now. also bec i can imagine what will happen when the null coalesccing operator is off the road.

    is there a way to try an older version of the plugin or an syntax workaround to make it running with my older version.

    i use PHP 5.6.40.
    the thing is, at the moment i cant update the php version but i would love to use the plugin to bring google fonts back home.

    thanks!

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    You do realize that PHP 5.6 has been End of Life for almost 4 (!) years now?

    OMGF is about the same age, so I built it on PHP 7 and I don’t think I ever tested it with PHP 5.6, since I knew that PHP 5.6 was going to be EOL soon.

    Anyway, you can try and download older versions here (go for v3.0.0 or higher), but I strongly suggest you invest in upgrading to at least PHP 7.4. Because your website is leaking like a sieve security-wise.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘cant activate plugin bec of syntax error’ is closed to new replies.