summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it.class b/it.class
index 2fc4b35..ab4d87b 100644
--- a/it.class
+++ b/it.class
@@ -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;