Skip to content

Commit 6ab0725

Browse files
Fix php offset error on empty string
1 parent 1033e9e commit 6ab0725

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Util/Path.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public static function withoutLeadingOrTrailingSlash(string $string) : string
173173
public static function isAbsolutePath(string $path) : bool
174174
{
175175
// path already absolute?
176-
if ($path[0] === '/') {
176+
if (substr($path, 0, 1) === '/') {
177177
return true;
178178
}
179179

0 commit comments

Comments
 (0)