diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2011-02-06 13:51:21 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2011-02-06 13:51:21 -0500 |
commit | 3a6cda80526d676a709c6ca1190d0f57f35a741c (patch) | |
tree | c7ae82466b4ba48f89dd661f5c838989002e74cf /usr/local/www/index.php | |
parent | 52cdb50b3df5facf9de1318f7318fea2cd09fbb0 (diff) | |
download | pfsense-3a6cda80526d676a709c6ca1190d0f57f35a741c.zip pfsense-3a6cda80526d676a709c6ca1190d0f57f35a741c.tar.gz |
Correctly detect amount of files in /var/crash
Diffstat (limited to 'usr/local/www/index.php')
-rwxr-xr-x | usr/local/www/index.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 1ea8e5b..30c369d 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -43,8 +43,18 @@ ##|-PRIV $crash = glob("/var/crash/*"); +$x = 0; if(is_array($crash)) { - if(count($crash) > 0) { + foreach($crash as $c) { + if($c == ".") + continue; + if($c == "..") + continue; + if($c == "") + continue; + $x++; + } + if($x > 0) { Header("Location: /crash_reporter.php"); exit; } |