diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2016-10-15 15:55:21 +0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-12-07 11:14:25 -0200 |
commit | e102e1d92654f0d3041c46c0b87a20b6f358ba01 (patch) | |
tree | 9f270a1a982556cbed310b75ca30195dbd6d91a4 /src/etc/inc/config.lib.inc | |
parent | a04cc2c5f1c13715ff839058728893197e05e64b (diff) | |
download | pfsense-e102e1d92654f0d3041c46c0b87a20b6f358ba01.zip pfsense-e102e1d92654f0d3041c46c0b87a20b6f358ba01.tar.gz |
php fatal error logging
(cherry picked from commit ae3463540ea0a3cc94c18ad9c7b829b2645e8910)
Diffstat (limited to 'src/etc/inc/config.lib.inc')
-rw-r--r-- | src/etc/inc/config.lib.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index e51dd0a..5bafa65 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -1011,15 +1011,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'); } } |