getMessage(); // phpcs:ignore error_log( 'Burst could not load, due to error: ' . $burst_message . ' in ' . $e->getFile() . ' on line ' . $e->getLine() ); update_option( 'burst_php_error_time', time() ); $burst_count = get_option( 'burst_php_error_count', 0 ) + 1; update_option( 'burst_php_error_count', $burst_count ); $burst_existing_errors = get_option( 'burst_php_error_detected', '' ); if ( strpos( $burst_existing_errors, $burst_message ) === false ) { $burst_existing_errors .= $burst_message . ' in ' . $e->getFile() . ' on line ' . $e->getLine() . PHP_EOL; update_option( 'burst_php_error_detected', $burst_existing_errors ); } add_action( 'admin_notices', function () { echo '
'; echo '

Urgent action required

'; echo '

Burst can not load due to the following error:
' . esc_html( str_replace( PHP_EOL, '
', get_option( 'burst_php_error_detected', '' ) ) ) . '

'; echo '
'; } ); }