/** * * @param type $errorNumber * @param type $errorString * @param type $errorFile * @param type $errorLine * @param type $errorContext */ function debug_error_handler($errorNumber, $errorString, $errorFile, $errorLine, $errorContext) { $debug_setting = debug_get_options(); $emailMessage = '<h2>' . __('Error Reporting on', 'debug') . ' :- </h2>[' . date("Y-m-d h:i:s", time()) . ']<br>'; $emailMessage .= '<h2>' . __('Error Number', 'debug') . ' :- </h2>' . print_r($errorNumber, true) . '<br>'; $emailMessage .= '<h2>' . __('Error String', 'debug') . ' :- </h2>' . print_r($errorString, true) . '<br>'; $emailMessage .= '<h2>' . __('Error File', 'debug') . ' :- </h2>' . print_r($errorFile, true) . '<br>'; $emailMessage .= '<h2>' . __('Error Line', 'debug') . ' :- </h2>' . print_r($errorLine, true) . '<br>'; $emailMessage .= '<h2>' . __('Error Context', 'debug') . ' :- </h2>' . debug_create_table_format($errorContext); $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; wp_mail($debug_setting['email'], 'Error Reporting from <b>' . get_bloginfo('name') . '</b> with the help of <a href="http://www.soninow.com" target=_blank">www.soninow.com</a>', $emailMessage, $headers); }
function debug_error_handler($errorNumber, $errorString, $errorFile, $errorLine, $errorContext) { $debug_setting = debug_get_options(); $emailMessage = '<h2>' . __('Error Reporting on', 'debug') . ' :- </h2>[' . date("Y-m-d h:i:s", time()) . ']<br>'; $emailMessage .= '<h2>' . __('Error Number', 'debug') . ' :- </h2>' . print_r($errorNumber, true) . '<br>'; $emailMessage .= '<h2>' . __('Error String', 'debug') . ' :- </h2>' . print_r($errorString, true) . '<br>'; $emailMessage .= '<h2>' . __('Error File', 'debug') . ' :- </h2>' . print_r($errorFile, true) . '<br>'; $emailMessage .= '<h2>' . __('Error Line', 'debug') . ' :- </h2>' . print_r($errorLine, true) . '<br>'; $emailMessage .= '<h2>' . __('Error Context', 'debug') . ' :- </h2>' . debug_create_table_format($errorContext); $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; wp_mail($debug_setting['email'], $debug_setting['subject'], $emailMessage, $headers); }