summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/config.lib.inc
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2016-10-15 15:55:21 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2016-10-15 17:04:05 +0200
commitae3463540ea0a3cc94c18ad9c7b829b2645e8910 (patch)
tree7d110207450364943b0adf28beb3a105e125574b /src/etc/inc/config.lib.inc
parent6172f3dedbf1fbcc0991f1ab5ec3b1636a4eb7c7 (diff)
downloadpfsense-ae3463540ea0a3cc94c18ad9c7b829b2645e8910.zip
pfsense-ae3463540ea0a3cc94c18ad9c7b829b2645e8910.tar.gz
php fatal error logging
Diffstat (limited to 'src/etc/inc/config.lib.inc')
-rw-r--r--src/etc/inc/config.lib.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc
index 2971c4a..1ad7b59 100644
--- a/src/etc/inc/config.lib.inc
+++ b/src/etc/inc/config.lib.inc
@@ -890,15 +890,17 @@ function pfSense_clear_globals() {
$error = error_get_last();
if ($error !== NULL) {
- if ($error['type'] == E_ERROR) {
+ if (in_array($error['type'], array(E_ERROR, E_COMPILE_ERROR, E_CORE_ERROR, E_RECOVERABLE_ERROR))) {
$errorstr = "PHP ERROR: Type: {$error['type']}, File: {$error['file']}, Line: {$error['line']}, Message: {$error['message']}";
print($errorstr);
log_error($errorstr);
+ file_notice("phperror", $errorstr, 'PHP errors');
} else if ($error['type'] != E_NOTICE) {
$errorstr = "PHP WARNING: Type: {$error['type']}, File: {$error['file']}, Line: {$error['line']}, Message: {$error['message']}";
// XXX: comment out for now, should re-enable post-2.2
//print($errorstr);
//log_error($errorstr);
+ //file_notice("phpwarning", $errorstr, 'PHP warning');
}
}
OpenPOWER on IntegriCloud