register_uninstall_hook was called incorrectly
-
nextgen-gallery-v1.9.8 (nggallery.php)
// Register a uninstall hook to remove all tables & option automatic register_uninstall_hook( $this->plugin_name, array('nggLoader', 'uninstall') );
Changed to …
nextgen-gallery-v1.9.9 (nggallery.php)
// Register a uninstall hook to remove all tables & option automatic register_uninstall_hook( $this->plugin_name, array(&$this, 'uninstall') );
The wp-debugger reports a problem:
register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information.
Why the change? v1.9.8 has worked correctly.
The actual wp-function (v3.5) …
function register_uninstall_hook( $file, $callback ) { if ( is_array( $callback ) && is_object( $callback[0] ) ) { _doing_it_wrong( __FUNCTION__, __( 'Only a static class method or function can be used in an uninstall hook.' ), '3.1' ); return; } ... }
Best regards
- The topic ‘register_uninstall_hook was called incorrectly’ is closed to new replies.