1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Do not panic on empty ban list file

This commit is contained in:
Miroslav Yovchev
2016-06-20 16:51:04 +03:00
parent 6d9a98fdf6
commit b50b09d62d

View File

@@ -385,7 +385,7 @@ class eIPHandler
if (!is_readable($fileName)) return; // @todo should we just die if no file - we know the IP is in the ban list.
$vals = file($fileName);
if ($vals === FALSE) return;
if ($vals === FALSE || count($vals) == 0) return;
if (substr($vals[0], 0, 5) != '<?php')
{
echo 'Invalid message file';
@@ -455,7 +455,7 @@ class eIPHandler
if (!is_readable($fileName)) return $ret;
$vals = file($fileName);
if ($vals === FALSE) return $ret;
if ($vals === FALSE || count($vals) == 0) return $ret;
if (substr($vals[0], 0, 5) != '<?php')
{
echo 'Invalid list file';