From a9ee006d50eecee4ecb5fe77c4decb98cb0c1b21 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 4 Jul 2011 19:53:17 -0400 Subject: [PATCH] Revert "Revert "Add php errors (non warnings) to the crash reporter"" This reverts commit eac584f3b61de3513baf54633d9a9b854ff6eb03. --- usr/local/www/index.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 92376e593f..2b9be16c6f 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 here for more information."; + $savemsg = "{$g['product_name']} has detected a crash report or programming bug. Click here for more information."; } }