From: Chuck Hagenbuch Date: Fri, 24 Jul 2009 21:32:13 +0000 (-0400) Subject: things can go wrong if substr converts an empty string to false X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a617531b1810f57ef80e11dbcbf504af2528d79b;p=horde.git things can go wrong if substr converts an empty string to false --- diff --git a/framework/Vcs/lib/Horde/Vcs/Git.php b/framework/Vcs/lib/Horde/Vcs/Git.php index 7bb108729..cad8a43d6 100644 --- a/framework/Vcs/lib/Horde/Vcs/Git.php +++ b/framework/Vcs/lib/Horde/Vcs/Git.php @@ -353,7 +353,7 @@ class Horde_Vcs_Directory_Git extends Horde_Vcs_Directory $dir = $this->queryDir(); if (substr($dir, 0, 1) == '/') { - $dir = substr($dir, 1); + $dir = (string)substr($dir, 1); } if (strlen($dir) && substr($dir, -1) != '/') { $dir .= '/';