Closed
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
While running a regular cron command:
wp cron event run --due-now
once the event produces a fatal error, the shutdown
action and custom register_shutdown_function
isn't called.
Describe how other contributors can replicate this bug
- Register an example cron event.
- Use callback
add_action( 'example', function() {
undef_function_9j8yf8me();
} );
- Watch for log file
register_shutdown_function( function() {
file_put_contents( dirname( __FILE__ ) . '/log.log', print_r( 'Shutdown called correctly', true ) . "\r\n\r\n", FILE_APPEND );
} );
- Run event - the log is not saved.
- Comment the call to undefined function in the event callback.
- Run event - the log is saved.
Describe what you would expect as the correct outcome
The shutdown function, thus shutdown
action executing with fatal errors.