WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Quick Fix: register_uninstall_hook needs different arguments

[Resolved] Quick Fix: register_uninstall_hook needs different arguments

  • bigdawggi
    Member

    @bigdawggi

    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/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Quick Fix: register_uninstall_hook needs different arguments’ is closed to new replies.