- This topic has 3 replies, 2 voices, and was last updated 1 year, 12 months ago by .
I noticed a PHP Fatal Error with RWMB_About::redirect().
If we use a php function to update the row in database for activated plugins, it automatically launches the function redirect() of the class RWMB_About. As if it considered a new activation of the plugin MB.
It looks the issue is due to the Hook
do_action( 'activate_plugin', trim( $plugin ) );
here's an example of the trace :
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function RWMB_About::redirect(), 1 passed in [...]/wp-includes/class-wp-hook.php on line 286 and exactly 2 expected in [...]/wp-content/plugins/meta-box/inc/about/about.php:155 Stack trace: #0 [...]/wp-includes/class-wp-hook.php(286): RWMB_About->redirect('search-and-repl...') #1 [...]/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 [...]/wp-includes/plugin.php(465): WP_Hook->do_action(Array) #3 [...]/wp-content/plugins/blob/blob.php(245): do_action('activated_plugi...', 'search-and-repl...') #4 [...]/wp-content/plugins/blob/blob.php(128): Blob->run_activate_plugin('search-and-repl...') #5 [...]/wp-includes/class-wp-hook.php(286): Blob->blob('') #6 /srv/data/web/vho in [...]/wp-content/plugins/meta-box/inc/about/about.php on line 155
How to avoid the function RWMB_About::redirect() to be launched ?
- You must be logged in to reply to this topic.