Changeset 92 for trunk/Packages/Common/Error.php
- Timestamp:
- Apr 7, 2020, 11:53:58 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Error.php
r77 r92 45 45 ); 46 46 47 if (($this->UserErrors & $Number))47 if (($this->UserErrors & $Number)) 48 48 { 49 49 // Error was suppressed with the @-operator 50 if (0 === error_reporting())50 if (0 === error_reporting()) 51 51 { 52 52 return false; … … 58 58 $Backtrace[0]['line'] = $LineNumber; 59 59 $this->Report($Backtrace); 60 //if ((E_ERROR | E_PARSE) & $Number)60 //if ((E_ERROR | E_PARSE) & $Number) 61 61 die(); 62 62 } … … 82 82 'An internal error occurred!<br/>'. 83 83 'Administrator will be notified and the problem will be investigated and fixed soon.'.'<br/><br/>'; 84 if ($this->ShowError == true)84 if ($this->ShowError == true) 85 85 $Output .= '<pre>'.$Message.'</pre><br/>'; 86 86 $Output .= '</body></html>'; … … 93 93 $Date = date('Y-m-d H:i:s'); 94 94 $Error = '# '.$Date."\n"; 95 foreach ($Backtrace as $Item)95 foreach ($Backtrace as $Item) 96 96 { 97 if (!array_key_exists('line', $Item)) $Item['line'] = '';98 if (!array_key_exists('file', $Item)) $Item['file'] = '';97 if (!array_key_exists('line', $Item)) $Item['line'] = ''; 98 if (!array_key_exists('file', $Item)) $Item['file'] = ''; 99 99 100 100 $Error .= ' '.$Item['file'].'('.$Item['line'].")\t".$Item['function']; 101 101 $Arguments = ''; 102 if (array_key_exists('args', $Item) and is_array($Item['args']))103 foreach ($Item['args'] as $Item)102 if (array_key_exists('args', $Item) and is_array($Item['args'])) 103 foreach ($Item['args'] as $Item) 104 104 { 105 if (is_object($Item)) ;106 else if (is_array($Item)) $Arguments .= "'".serialize($Item)."',";105 if (is_object($Item)) ; 106 else if (is_array($Item)) $Arguments .= "'".serialize($Item)."',"; 107 107 else $Arguments .= "'".$Item."',"; 108 108 } 109 if (strlen($Arguments) > 0) $Error .= '('.substr($Arguments, 0, -1).')';109 if (strlen($Arguments) > 0) $Error .= '('.substr($Arguments, 0, -1).')'; 110 110 $Error .= "\n"; 111 111 } 112 112 $Error .= "\n"; 113 113 114 foreach ($this->OnError as $OnError)114 foreach ($this->OnError as $OnError) 115 115 call_user_func($OnError, $Error); 116 116 }
Note:
See TracChangeset
for help on using the changeset viewer.