WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
[resolved] Quick Fix: register_uninstall_hook needs different arguments (2 posts)

  1. bigdawggi
    Member
    Posted 1 year ago #

    Bit of retentiveness here but with WP_DEBUG on, I get a warning from WP:
    "Notice: register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook."

    I'm using WP 3.5.1 and plugin ver: 1.9.10

    Looks like just a one-line fix will likely resolve it:

    CHANGE
    // Register a uninstall hook to remove all tables & option automatic
    register_uninstall_hook( $this->plugin_name, array(&$this, 'uninstall') );

    TO

    // Register a uninstall hook to remove all tables & option automatic
    register_uninstall_hook( $this->plugin_name, array('nggLoader', 'uninstall') );

    Hope it can make it in the next update! Thanks!

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. davemac
    Member
    Posted 1 year ago #

    Great fix, yes I would love to see this in the next upgrade as well.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic