diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-02-19 00:54:57 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-02-19 00:54:57 +0000 |
commit | a33fd56820a2423378ef7b4a56721d9fe21bbf17 (patch) | |
tree | 4186fc178a2c968fa43cb4c43eb571c4f70b6101 /etc | |
parent | 167bcf84f2f6fd499deb76b6977a257e1157f2f2 (diff) | |
download | pfsense-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.inc | 4 |
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); } |