diff options
author | Scott Ullrich <sullrich@gmail.com> | 2011-07-04 19:30:25 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@gmail.com> | 2011-07-04 19:30:25 -0400 |
commit | cb61dad8ab812a3740648dc0e3f4b74959713ef3 (patch) | |
tree | 2ce77a73d5b5e07d1a0eefa150b896a514c76a21 | |
parent | 88dadca1ba6e7bcedc809aa2f7462b9649545edf (diff) | |
download | pfsense-cb61dad8ab812a3740648dc0e3f4b74959713ef3.zip pfsense-cb61dad8ab812a3740648dc0e3f4b74959713ef3.tar.gz |
Add php errors (non warnings) to the crash reporter
-rwxr-xr-x | usr/local/www/index.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 92376e5..2b9be16 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -58,8 +58,13 @@ require_once('notices.inc'); if($g['disablecrashreporter'] != true) { // Check to see if we have a crash report - $crash = glob("/var/crash/*"); $x = 0; + if(file_exists("/tmp/PHP_errors.log")) { + $total = `/bin/cat /tmp/PHP_errors.log | /usr/bin/grep -vi warning | wc -l | awk '{ print $1 }'`; + if($total > 0) + $x++; + } + $crash = glob("/var/crash/*"); $skip_files = array(".", "..", "minfree", ""); if(is_array($crash)) { foreach($crash as $c) { @@ -67,7 +72,7 @@ if($g['disablecrashreporter'] != true) { $x++; } if($x > 0) - $savemsg = "{$g['product_name']} has detected a crash report. Click <a href='crash_reporter.php'>here</a> for more information."; + $savemsg = "{$g['product_name']} has detected a crash report or programming bug. Click <a href='crash_reporter.php'>here</a> for more information."; } } |