mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
crash reporter: file may be empty preventing report suppression
This commit is contained in:
parent
9ecce53e8c
commit
d84c544d4f
@ -1112,9 +1112,13 @@ function get_crash_report($pedantic = false)
|
||||
$count = 0;
|
||||
|
||||
if (file_exists('/tmp/PHP_errors.log')) {
|
||||
/* only notify about crash report when there's an error */
|
||||
$total = `/usr/bin/grep -v 'PHP Warning:' /tmp/PHP_errors.log | /usr/bin/wc -l | /usr/bin/awk '{ print $1 }'`;
|
||||
if ($total > 0 || $pedantic) {
|
||||
if ($pedantic) {
|
||||
$total = `/usr/bin/wc -l /tmp/PHP_errors.log | /usr/bin/awk '{ print $1 }'`;
|
||||
} else {
|
||||
/* only notify about crash report when there's an error */
|
||||
$total = `/usr/bin/grep -v 'PHP Warning:' /tmp/PHP_errors.log | /usr/bin/wc -l | /usr/bin/awk '{ print $1 }'`;
|
||||
}
|
||||
if ($total > 0) {
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user