authhtpasswd : Check if the first char exists before testing it

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2560 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-02-24 15:45:57 +00:00
parent a88d8ed223
commit b847ec4261

View File

@@ -36,7 +36,7 @@ class authhtpasswd extends auth
foreach ($lines as $line) foreach ($lines as $line)
{ {
// Comment line : skip it // Comment line : skip it
if ($line{0} === "#") if (isset ($line{0}) && $line{0} === "#")
continue; continue;
$line = trim ($line); $line = trim ($line);
$user = strstr ($line, ":", true); $user = strstr ($line, ":", true);