summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/index.php
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-09-15 14:28:02 -0300
committerRenato Botelho <renato@netgate.com>2015-09-15 14:28:29 -0300
commite8bd1464281b4ee02484fca910457b852d71e704 (patch)
treeaaec3182a7752704afa14d6a62dd15729268b173 /src/usr/local/www/index.php
parent5c7657d6319f03849480ff8999032cf0383e7a53 (diff)
downloadpfsense-e8bd1464281b4ee02484fca910457b852d71e704.zip
pfsense-e8bd1464281b4ee02484fca910457b852d71e704.tar.gz
To not try to include files that don't exist
Diffstat (limited to 'src/usr/local/www/index.php')
-rw-r--r--src/usr/local/www/index.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php
index db0a33b..0760197 100644
--- a/src/usr/local/www/index.php
+++ b/src/usr/local/www/index.php
@@ -259,7 +259,9 @@ foreach ($phpincludefiles as $includename) {
if (!stristr($includename, ".inc")) {
continue;
}
- include($directory . $includename);
+ if (file_exists($directory . $includename)) {
+ include($directory . $includename);
+ }
}
## Set Page Title and Include Header
@@ -327,6 +329,10 @@ foreach ($widgets as $widgetname => $widgetconfig)
if ($widgetconfig['display'] == 'none')
continue;
+ if (!file_exists('/usr/local/www/widgets/widgets/'. $widgetname.'.widget.php')) {
+ continue;
+ }
+
if (!isset($widgetColumns[ $widgetconfig['col'] ]))
$widgetColumns[ $widgetconfig['col'] ] = array();
OpenPOWER on IntegriCloud