Fatal error when adding new cron event with invalid argument
-
Hi,
Just stumbled on this bug when I was trying to add a new cron event. I passed in an integer argument rather than a JSON array (I was in a hurry and didn’t read the help text).
Anyway, hitting submit generates a fatal error which then generates the WordPress email “Your Site is Experiencing a Technical Issue”.
WordPress version 5.7.1 Current plugin: WP Crontrol (version 1.10.0) PHP version 7.4.16
Error Details ============= An error of type E_ERROR was caused in line 130 of the file /home/user/public_html/wp/wp-content/plugins/wp-crontrol/src/event.php. Error message: Uncaught TypeError: Argument 4 passed to Crontrol\Event\add() must be of the type array, int given, called in /home/user/public_html/wp/wp-content/plugins/wp-crontrol/wp-crontrol.php on line 168 and defined in /home/user/public_html/wp/wp-content/plugins/wp-crontrol/src/event.php:130 Stack trace: #0 /home/user/public_html/wp/wp-content/plugins/wp-crontrol/wp-crontrol.php(168): Crontrol\Event\add('2021-05-18 00:0...', 'weekly', 'userebadmin...', 11764) #1 /home/user/public_html/wp/wp-includes/class-wp-hook.php(292): Crontrol\action_handle_posts('') #2 /home/user/public_html/wp/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #3 /home/user/public_html/wp/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #4 /home/user/public_html/wp/wp-settings.php(560): do_action('init') #5 /home/user/public_html/wp/wp-config.php(102): require_once('/home/user/...')
Not a show stopper because most users who use this plugin know what they are doing, but it would be nice to have some basic validation on the argument field so it won’t trigger the error.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Fatal error when adding new cron event with invalid argument’ is closed to new replies.