Support » Plugin: WordPress Gallery Plugin - NextGEN Gallery » PHP 7.1 Warning class-wp-hook.php on line 298

  • Resolved Actor Mike

    (@websiteworld)


    After disabling all our plugins, we finally determined that the NextGen Gallery Plugin Version 2.1.69 was causing a PHP Warning message in the PHP log as seen below:

    [25-Jan-2017 22:12:42 UTC] PHP Warning: Parameter 2 to M_DataMapper::set_custom_wp_query() expected to be a reference, value given in D:\mysite.com\wp-includes\class-wp-hook.php on line 298

    If we disable the plugin the warning message in the server logs goes away.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Got the same error, tried to install an older version of NextGen but it did not help. It is when I am running a website on one.com I get the error, not with other providers.

    But it is a pain in the ass since the site is based on NextGen Gallery.

    Fixed. had to downgrade php to version 5,6

    Plugin Author photocrati

    (@photocrati)

    @websiteworld – We will be looking at refactoring for PHP 7.1 issues although unfortunately I do not have a timeline at the moment, our apologies for these warning messages filling up the PHP error_logs although in and of themselves you should not be seeing any specific issue.

    Thanks!

    – Cais.

    Fixed it, switched to a different plugin.

    Plugin Author photocrati

    (@photocrati)

    @nevis-1 – Thanks for your update although it would be more relevant to your own topic.

    – Cais.

    Thread Starter Actor Mike

    (@websiteworld)

    @photocrati So are you saying that the warning message isn’t really a big problem?

    Thread Starter Actor Mike

    (@websiteworld)

    I added this code to the nggallery.php to suppress the warnings for now.

    <?php
    // Turn off all error reporting
    error_reporting(0);
    ?>

    Plugin Author photocrati

    (@photocrati)

    @websiteworld – Correct, warnings are very much a nuisance and we will be working to get those cleared (at least in production environments to start with).

    Thanks for sharing your work-around as well!

    – Cais.

    Just for anyone else finding this via google looking for a quick fix, add
    error_reporting(1); instead of 0 at the top of the wp-content/plugins/nggallery.php file.

    0 disables all error logging, including fatal errors. You want to log fatal errors, because these are the type likely to break your site!

    Plugin Author photocrati

    (@photocrati)

    @kirrus – Thanks for sharing this tip!

    – Cais.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘PHP 7.1 Warning class-wp-hook.php on line 298’ is closed to new replies.