• Resolved Rex V

    (@rextc)


    I’ve spent the last few hours trying to find out why a development WordPress installation wouldn’t display bugs despite all PHP debug flags set to true. It turned out to be the NGG plugin; after disabling the plugin, PHP errors would display normally.

    After lots of debugging we found that the NextGen plugin was altering the behavior of PHP error reporting. One important line is nggallery.php:169:

    set_exception_handler(__CLASS__.'::shutdown');

    This replaces the default exception handler globally with the NGG exception handler. This can be demonstrated by adding the following line to wp-settings.php:308:

    non_existent_function().

    This shows a modified error report as opposed to calling the non-existent function a few lines earlier. I’ve determined this happens during loading of NGG..

    After wp-settings.php:450 (do_action(‘init’)) errors do not display at all. I don’t know the exact reason for this, but the issue is resolved when disabling NextGen Gallery.

    Why does NextGen Gallery decide to overwrite PHP exception handling? Why does NGG need to insert its own functionality in the error reporting? This affects a website globally.

    We’re using the most recent version of WordPress (4.98) and NGG (3.0.8) with PHP 7.0.26-2+ubuntu14.04.1+deb.sury.org+2.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Imagely

    (@imagely)

    We have already asked our developers.
    As soon as we hear back from them we’ll be writing you back.

    Plugin Contributor Imagely

    (@imagely)

    We have created a “Bug Report” to be review by our developers.
    Please keep in mind that our developers need to address this issues in order of priority, so an issue that many hundreds of users are experiencing will need to be addressed before an issue reported that is affecting only a few users or just one.
    We’ll keep you posted.

    Thread Starter Rex V

    (@rextc)

    Wow, thank you for the quick reply! For now we’ve asked developers to disable NGG on their local installations so it does not interfere with development. I hope this can be resolved soon, thanks again.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘NGG interferes with error reporting during debugging’ is closed to new replies.