Zeile 61 | Zeile 61 |
---|
E_USER_WARNING => 'User Warning', E_USER_NOTICE => 'User Notice', E_USER_DEPRECATED => 'User Deprecated Warning',
|
E_USER_WARNING => 'User Warning', E_USER_NOTICE => 'User Notice', E_USER_DEPRECATED => 'User Deprecated Warning',
|
E_STRICT => 'Runtime Notice',
| |
E_RECOVERABLE_ERROR => 'Catchable Fatal Error', MYBB_SQL => 'MyBB SQL Error', MYBB_TEMPLATE => 'MyBB Template Error',
| E_RECOVERABLE_ERROR => 'Catchable Fatal Error', MYBB_SQL => 'MyBB SQL Error', MYBB_TEMPLATE => 'MyBB Template Error',
|
Zeile 100 | Zeile 99 |
---|
E_DEPRECATED, E_NOTICE, E_USER_NOTICE,
|
E_DEPRECATED, E_NOTICE, E_USER_NOTICE,
|
E_STRICT
| |
);
/**
| );
/**
|
Zeile 130 | Zeile 128 |
---|
*/ function __construct() {
|
*/ function __construct() {
|
| if(version_compare(PHP_VERSION, '7.0', '<')) { $this->error_types[E_STRICT] = 'Runtime Notice'; $this->ignore_types[] = E_STRICT; }
|
// Lets set the error handler in here so we can just do $handler = new errorHandler() and be all set up. $error_types = E_ALL; foreach($this->ignore_types as $bit)
| // Lets set the error handler in here so we can just do $handler = new errorHandler() and be all set up. $error_types = E_ALL; foreach($this->ignore_types as $bit)
|
Zeile 142 | Zeile 146 |
---|
/** * Passes relevant arguments for error processing.
|
/** * Passes relevant arguments for error processing.
|
*
| *
|
* @param string $type The error type (i.e. E_ERROR, E_FATAL) * @param string $message The error message * @param string $file The error file
| * @param string $type The error type (i.e. E_ERROR, E_FATAL) * @param string $message The error message * @param string $file The error file
|
Zeile 166 | Zeile 170 |
---|
function error($type, $message, $file=null, $line=0, $allow_output=true) { global $mybb;
|
function error($type, $message, $file=null, $line=0, $allow_output=true) { global $mybb;
|
|
|
// Error reporting turned off for this type if((error_reporting() & $type) == 0) { return true; }
|
// Error reporting turned off for this type if((error_reporting() & $type) == 0) { return true; }
|
if(in_array($type, $this->ignore_types))
| if(in_array($type, $this->ignore_types)) { return true; }
if(isset($file)) { $file = str_replace(MYBB_ROOT, "", $file); } else { $file = ""; }
if($type == MYBB_SQL || strpos(strtolower($this->error_types[$type]), 'warning') === false)
|
{
|
{
|
return true;
| $this->has_errors = true;
|
}
|
}
|
$file = str_replace(MYBB_ROOT, "", $file);
$this->has_errors = true;
| |
// For some reason in the installer this setting is set to "<" $accepted_error_types = array('both', 'error', 'warning', 'none');
| // For some reason in the installer this setting is set to "<" $accepted_error_types = array('both', 'error', 'warning', 'none');
|
Zeile 382 | Zeile 396 |
---|
$error_data .= $back_trace; $error_data .= "</error>\n\n";
|
$error_data .= $back_trace; $error_data .= "</error>\n\n";
|
if(isset($mybb->settings['errorloglocation']) && trim($mybb->settings['errorloglocation']) != "")
| if( isset($mybb->settings['errorloglocation']) && trim($mybb->settings['errorloglocation']) != "" && substr($mybb->settings['errorloglocation'], -4) !== '.php' )
|
{ @error_log($error_data, 3, $mybb->settings['errorloglocation']); }
| { @error_log($error_data, 3, $mybb->settings['errorloglocation']); }
|