execute(); } catch ( \Throwable $e ) { atkp_cron_error_page( get_class( $e ) . ': ' . $e->getMessage(), null, $e ); } function atkp_cron_error_page( string $title, ?string $detail = null, ?\Throwable $exception = null ) { if ( ! headers_sent() ) { header( 'Content-Type: text/html; charset=UTF-8', true, 500 ); } ?> affiliate-toolkit Cron Error

affiliate-toolkit — Cron Error

File
getFile() ); ?>
Line
getLine(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
Code
getCode(), ENT_QUOTES, 'UTF-8' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
Stack TracegetTraceAsString() ); foreach ( $frames as $frame ) { $frame = htmlspecialchars( $frame ); // highlight file paths and line numbers $frame = preg_replace( '/(#\d+)/', '$1', $frame ); $frame = preg_replace( '/([^\s(]+\.php)/', '$1', $frame ); $frame = preg_replace( '/\((\d+)\)/', '($1)', $frame ); // Frame already escaped via htmlspecialchars; span tags are intentional. echo $frame . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } ?>
get_crontype(); $mode = ATKPTools::get_get_parameter( 'mode', 'string' ); $key = ATKPTools::get_get_parameter( 'key', 'string' ); $cron_key = ATKPTools::get_setting( ATKP_PLUGIN_PREFIX . '_cronkey' ); if ( php_sapi_name() == 'cli' ) echo 'cmd mode running'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped else if ( defined( 'WP_CLI' ) && WP_CLI ) { echo 'cli mode running'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } else { if ( $key == '' || trim( $cron_key ) != trim( $key ) ) { echo 'key invalid'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped die( 401 ); } } switch ( $crontype ) { default: case 'wpcron': //wp cron? nothing todo... echo 'external cronjob deactivated'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped die( 404 ); case 'external': case 'externaloutput': $cronjob = new atkp_cronjob_new( $crontype == 'externaloutput' ); $cronjob->do_work( false, $mode ); break; } //exit the script exit; } } ?>