Revision ce5e2867
Added by Stilez y about 8 years ago
src/etc/inc/config.lib.inc | ||
---|---|---|
1031 | 1031 |
|
1032 | 1032 |
$error = error_get_last(); |
1033 | 1033 |
|
1034 |
if ($error !== NULL) { |
|
1034 |
// Errors generated by user code (diag_commands.php) are identified by path and not added to notices |
|
1035 |
if ($error !== NULL && !preg_match('^' . $g['tmp_path_user_code'] . '/[^/]{1,16}$', $error['file'])) { |
|
1035 | 1036 |
if (in_array($error['type'], array(E_ERROR, E_COMPILE_ERROR, E_CORE_ERROR, E_RECOVERABLE_ERROR))) { |
1036 | 1037 |
$errorstr = "PHP ERROR: Type: {$error['type']}, File: {$error['file']}, Line: {$error['line']}, Message: {$error['message']}"; |
1037 | 1038 |
print($errorstr); |
Also available in: Unified diff
Don't create system notices for errors in user-entered ad-hoc PHP (diag_command.php)
(cherry picked from commit ff4e29fb9d048162f0d4d28b0c3e818ed2c1fd8e)