diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -747,7 +747,7 @@ static function mail($p) static function file_get($filename, $p = array()) { $data = file_get_contents($filename == "-" ? "php://stdin" : $filename); - if ($p['keyval']) + if ($p['keyval'] && $data !== false) { foreach (explode("\n", rtrim($data, "\n")) as $line) { @@ -756,7 +756,7 @@ static function file_get($filename, $p = array()) } } else if ($p['lines']) - $result = explode("\n", rtrim($data, "\n")); + $result = $data !== false ? explode("\n", rtrim($data, "\n")) : array(); else $result = $data; |