summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-02-19 00:54:57 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-02-19 00:54:57 +0000
commita33fd56820a2423378ef7b4a56721d9fe21bbf17 (patch)
tree4186fc178a2c968fa43cb4c43eb571c4f70b6101 /etc
parent167bcf84f2f6fd499deb76b6977a257e1157f2f2 (diff)
downloadpfsense-a33fd56820a2423378ef7b4a56721d9fe21bbf17.zip
pfsense-a33fd56820a2423378ef7b4a56721d9fe21bbf17.tar.gz
If a filename is not found, log to syslog and return
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 6e5e321..fcdabac 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -63,6 +63,10 @@ function return_dir_as_array($dir) {
function return_filename_as_string($filename) {
$tmp = "";
$fd = fopen($filename, "r");
+ if(!$fd) {
+ log_error("Could not open {$filename}");
+ return;
+ }
while(!feof($fd)) {
$tmp .= fread($fd,49);
}
OpenPOWER on IntegriCloud