Changeset 11457 for freepbx/branches
- Timestamp:
- 02/18/11 20:25:42 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.9/amp_conf/htdocs/admin/libraries/utility.functions.php
r11456 r11457 45 45 // PHP Error Handler provides it's own formatting 46 46 // 47 $txt = sprintf("[%s ]%s\n", $level, $message);47 $txt = sprintf("[%s-%s\n", $level, $message); 48 48 } 49 49 … … 306 306 global $amp_conf; 307 307 308 $errortype = array ( 309 E_ERROR => 'ERROR', 310 E_WARNING => 'WARNING', 311 E_PARSE => 'PARSE_ERROR', 312 E_NOTICE => 'NOTICE', 313 E_CORE_ERROR => 'CORE_ERROR', 314 E_CORE_WARNING => 'CORE_WARNING', 315 E_COMPILE_ERROR => 'COMPILE_ERROR', 316 E_COMPILE_WARNING => 'COMPILE_WARNING', 317 E_USER_ERROR => 'USER_ERROR', 318 E_USER_WARNING => 'USER_WARNING', 319 E_USER_NOTICE => 'USER_NOTICE', 320 E_STRICT => 'RUNTIM_NOTICE', 321 E_RECOVERABLE_ERROR => 'CATCHABLE_FATAL_ERROR', 322 ); 323 308 324 if (!isset($amp_conf['PHP_ERROR_HANDLER_OUTPUT'])) { 309 325 $amp_conf['PHP_ERROR_HANDLER_OUTPUT'] = 'dbug'; … … 312 328 switch($amp_conf['PHP_ERROR_HANDLER_OUTPUT']) { 313 329 case 'freepbxlog': 314 $txt = sprintf(" (%s:%s)-ERRNO[%s] - %s", $errfile, $line, $errorno, $errstr);330 $txt = sprintf("%s] (%s:%s) - %s", $errortype[$errno], $errfile, $errline, $errstr); 315 331 freepbx_log(FPBX_LOG_PHP,$txt); 316 332 break; … … 321 337 $txt = date("Y-M-d H:i:s") 322 338 . "\t" . $errfile . ':' . $errline 323 . "\n \n"324 . ' ERROR[' . $errno. ']: '339 . "\n" 340 . '[' . $errortype[$errno] . ']: ' 325 341 . $errstr 326 . "\n\n \n";342 . "\n\n"; 327 343 dbug_write($txt,$check=''); 328 344 break;
