• Resolved tangobango

    (@tangobango)


    I can’t activate the plug in. I get this error:

    Parse error: syntax error, unexpected T_FUNCTION in /home3/tangoban/public_html/ourbigitalianadventure.com/wp-content/plugins/above-the-fold-optimization/includes/webfonts.class.php on line 368

    Thanks.

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

    (@optimalisatie)

    Hi Tangobango,

    The plugin source on WordPress should be valid (and is already in use by many websites). The error should not be possible.

    The following code should be on line 368 in file /includes/webfonts.class.php:

    if (!empty($this->googlefonts) && isset($this->CTRL->options['gwfo_googlefonts_remove']) && !empty($this->CTRL->options['gwfo_googlefonts_remove'])) {

    Could you please check the source of that file and post the line that is visible on that location?

    Some possible explanations:

    – a virus has malformed the source code
    – the WordPress source is invalid
    – the download of the plugin was partially completed

    — snip —

    Thread Starter tangobango

    (@tangobango)

    Hi.

    I checked the line and it matched.

    Then I deleted the plugin and downloaded again. I still get the same error.

    Very puzzling.

    Thread Starter tangobango

    (@tangobango)

    Hi. I just tried it in a fresh install of WP 3.7 Same error.

    Plugin Author optimalisatie

    (@optimalisatie)

    Hi Tangobango,

    The error you received should be impossible and is not related to the plugin.

    If you want further assistance, please post your support request on Github where other developers will be able to review your problem.

    https://github.com/optimalisatie/above-the-fold-optimization/issues

    This topic will be closed.

    — snip —

    Hi Tangobango,

    Did you ever find a solution to the T_FUNCTION issue? I’m having the same problem. Any hints would be really appreciated.

    Thanks,
    Philipp

    Thread Starter tangobango

    (@tangobango)

    No. I just didn’t use the plugin.

    The “the error should be impossible” comment turned me off on it. “Should be” wasn’t the issue.

    Maybe it was another plugin, but it wasn’t worth my time to figure it out.

    Sorry I can’t help.

    Thanks Tangobango,

    I’ll keep working on it a bit and see what I can find. I appreciate you taking the time to reply.

    Cheers.

    Plugin Author optimalisatie

    (@optimalisatie)

    Hi philippknoll and tangobango,

    Our apologies. We discovered that the error is related to the PHP version. PHP <5.3 doesn’t support the use keyword for anonymous functions.

    $this->googlefonts = array_filter($this->googlefonts, function($font) use ($removeList) {

    The next plugin update may require PHP v5.3+ by default.

    The plugin was quickly setup as a tool for professional optimization services (on servers where it simply works well), it was never intended as a public plugin for any environment.

    For now (if you want to use the plugin) my advise is to upgrade PHP to a recent version.

    • This reply was modified 7 years, 9 months ago by optimalisatie.
    Thread Starter tangobango

    (@tangobango)

    Hi, PageSpeed,

    Thanks for the gracious response. I have upgraded php and I’ll try again.

    Too bad about the WP spam issue, but great that you support on github.

    Tangobango

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Activation Parse error: syntax error, unexpected T_FUNCTION’ is closed to new replies.