Support » Plugin: Top 10 - Popular posts plugin for WordPress » Fatal error installing Top 10 2.40

  • Resolved Bryan Eggers

    (@beggers)


    Ajay,

    I just tried to upgraded to version 2.40 and got this error:

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

    Fatal error: Can’t use function return value in write context in /var/www/vhosts/vegasnews.com/httpdocs/wp-content/plugins/top-10/admin/admin.php on line 107

    I tried deleting the old version entirely and doing a fresh install but same error.

    Bryan Eggers
    http://www.VegasNews.com

Viewing 12 replies - 1 through 12 (of 12 total)
  • Had the same error…had to revert to the back-up I made just before updating

    I just updated two of my sites with the top 10 update, and immediately lost access to the admin side of both sites.

    Had to disable the plugin via my host CPanel to get access back.

    An update to this:

    Two of my sites on Bluehost with the Top 10 updated to 2.4 caused me to lose access to my admin side, and I had to disable the plugin to get back in.
    Two other sites of mine, on Bluehost, using Top 10 v2.3.2 are working OK

    One of my sites on HostMetro and the Top 10 updated to 2.4 had no known adverse effects.

    It may be a conflict with another plugin, or something at the host?
    Hostmetro: PHP Version 5.5.36
    Bluehost: PHP Version 5.4.43

    Same error for me

    I am having the same issue after I have updated the plugin.

    Plugin Author Ajay

    (@ajay)

    Hi there was a problem with installs before PHP5.6 which caused this issue. I’ve released a new version that should fix this.

    You can edit the admin/admin.php file and change line 107 to this.

    $tptn_settings['exclude_post_ids'] = empty( $_POST['exclude_post_ids'] ) ? '' : implode( ',', array_map( 'absint', explode( ',', sanitize_text_field( wp_unslash( $_POST['exclude_post_ids'] ) ) ) ) );
    

    Apologies for this and thanks for using the plugin.

    • This reply was modified 3 years, 2 months ago by Ajay.

    Same error. 🙁

    Fix worked, Ajay!

    Ajay, thanks for the quick fix! I’ve been using this plugin for several years and really got nervous when it stopped working. Working fine now!

    Bryan

    Plugin Author Ajay

    (@ajay)

    Thanks Bryan and AstroNerdBoy

    Thank you for the quick fix!

    I run three blogs on two different hosts. V2.4.1 works on one host but not on the second one. I got a new fatal error on the second host.

    Parse error: syntax error, unexpected T_FUNCTION in […] /wp-content/plugins/top-10/admin/class-stats.php on line 556

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Fatal error installing Top 10 2.40’ is closed to new replies.