8000 Don’t use substr() · symfony/symfony@bce33c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit bce33c4

Browse files
committed
Don’t use substr()
1 parent 193cdf8 commit bce33c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Filesystem/Filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public function makePathRelative($endPath, $startPath)
359359
}
360360

361361
$stripDriveLetter = function ($path) {
362-
if (strlen($path) > 2 && substr($path, 1, 2) === ':/' && ctype_alpha($path[0])) {
362+
if (strlen($path) > 2 && ':' === $path[1] && '/' === $path[2] && ctype_alpha($path[0])) {
363363
return substr($path, 2);
364364
}
365365

0 commit comments

Comments
 (0)
0