'Error', 2 => 'Warning', 4 => 'Parsing Error', 8 => 'Notice', 16 => 'Core Error', 32 => 'Core Warning', 64 => 'Compile Error', 128 => 'Compile Warning', 256 => 'User Error', 512 => 'User Warning', 1024 => 'User Notice' ); $UserErrors = E_ALL; //E_ERROR | E_WARNING | E_PARSE; if(($UserErrors & $Number)) { $Error = '# '.$Date.' : '.$Message.' on line '.$LineNumber."\n"; $Backtrace = debug_backtrace(); $Backtrace[0]['function'] = ''; $Backtrace[0]['args'] = ''; if(!array_key_exists('line', $Backtrace[0])) $Backtrace[0]['line'] = ''; if(!array_key_exists('file', $Backtrace[0])) $Backtrace[0]['file'] = ''; //$First = array_shift($Backtrace); //print_r($First); //array_unshift($Backtrace, $First); //array_shift($Backtrace); //print_r($Backtrace); foreach($Backtrace as $Item) { $Error .= ' '.$Item['file'].'('.$Item['line'].")\t".$Item['function']; $Arguments = ''; if(array_key_exists('args', $Item) and is_array($Item['args'])) foreach($Item['args'] as $Item) { if(is_array($Item)) $Arguments .= "'".serialize($Item)."',"; else $Arguments .= "'".serialize($Item)."',"; } if(strlen($Arguments) > 0) $Error .= '('.substr($Arguments, 0, -1).')'; $Error .= "\n"; } $Error .= "\n"; //if($Config['Web']['ErrorLogFile'] != '') //error_log($Error, 3, $Config['Web']['ErrorLogFile']); // Pošli mi zprávu (pokud je to kritická chyba) //mail($Config['Web']['AdminEmail'], $Config['Web']['Title'].' - ChybovĂ© hlášenĂ', $Error); // Show error message if($Config['Web']['ShowPHPError'] == true) { echo(''."\n". ''. ''. '
'. ''. ''. 'Došlo k vnitřnà chybě!'.$Error.'