summaryrefslogtreecommitdiffstats
path: root/usr/local/www/index.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2011-02-06 13:51:21 -0500
committerScott Ullrich <sullrich@pfsense.org>2011-02-06 13:51:21 -0500
commit3a6cda80526d676a709c6ca1190d0f57f35a741c (patch)
treec7ae82466b4ba48f89dd661f5c838989002e74cf /usr/local/www/index.php
parent52cdb50b3df5facf9de1318f7318fea2cd09fbb0 (diff)
downloadpfsense-3a6cda80526d676a709c6ca1190d0f57f35a741c.zip
pfsense-3a6cda80526d676a709c6ca1190d0f57f35a741c.tar.gz
Correctly detect amount of files in /var/crash
Diffstat (limited to 'usr/local/www/index.php')
-rwxr-xr-xusr/local/www/index.php12
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;
}
OpenPOWER on IntegriCloud