WordPress.org

Forums

WP Hotkeys
[resolved] Can't activate (9 posts)

  1. SickSquirrel
    Member
    Posted 1 year ago #

    Parse error: syntax error, unexpected T_FUNCTION in /***************************.com/wp-content/plugins/wp-hotkeys/lib/admin/admin.php on line 353

    Uploaded, tried to activate

    https://wordpress.org/plugins/wp-hotkeys/

  2. SickSquirrel
    Member
    Posted 1 year ago #

    Plugin could not be activated because it triggered a fatal error.

    Happened on nine sites. Researched but could not find an answer.

  3. Mickey Kay
    Member
    Plugin Author

    Posted 1 year ago #

    Hi SickSquirrel,

    Apologies for the delay - I was out of town on vacation.

    Anyhow, I took a look at this and realized the issue arose because my code was calling an anonymous function - something that's okay in PHP 5.3+ but throws a fatal error in previous versions of PHP.

    I've uploaded version 0.9.5 of this plugin, which should fix the issue. Thanks for your feedback and patience.

    All the best,
    Mickey

  4. SickSquirrel
    Member
    Posted 1 year ago #

    Thank you! I've been sick and not at my laptop in four days. Tomorrow I should be well enough to download then upload to all sites. I'll test it on one first to be sure all errors are gone. I'll let you know how it goes.

  5. SickSquirrel
    Member
    Posted 1 year ago #

    My host disabled it on all sites. Sites weren't loading, error logs were filling.

  6. Mickey Kay
    Member
    Plugin Author

    Posted 1 year ago #

    Oh no! This is not good.

    Any way of seeing those error logs? It's running fine on all my sites on numerous hosts. Are you sure you tried the latest version?

    Thanks.

  7. SickSquirrel
    Member
    Posted 1 year ago #

    From my host:

    The site was not loading because of a problem with one of the plugins:

    PHP Parse error: syntax error, unexpected T_FUNCTION in /mnt/glusterfs/apache/hosting-dir/118568997/user_dir/domain.com/wp-content/plugins/wp-hotkeys/lib/admin/admin.php on line 353

    I renamed the plugin folder to something else and the site is loading ok

    I then checked other sites and none would load until I renamed the plugin.

    Version 0.9.6 | By MIGHTYminnow |

    I believe that is the latest version. Hope this helps

  8. Mickey Kay
    Member
    Plugin Author

    Posted 1 year ago #

    Aha, I see the problem. Thanks a ton for your help. Bottom line: version 0.9.7, which I've just added, should solve this for you.

    The issue was arising because of an "anonymous function call," which isn't allowed in older versions of PHP. I've replaced this function call with a more backwards-compatible method, so things should work for you now. You may want to speak with your host about upgrading your PHP version as well, as there are a lot of benefits to newer versions.

    Thanks so much for your help and patience on this one, and please do let me know if you encounter any further issues.

    All the best,
    Mickey

  9. Mickey Kay
    Member
    Plugin Author

    Posted 1 year ago #

    Once again, apologies on this one. I think somehow I must have accidentally reverted the code, since this issue was resolved in version 0.9.5 and was somehow reintroduced. Should all be fixed now though :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Hotkeys
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.