Skip to content

Commit

Permalink
Replace str_ends_with with substr to maintain compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
om4csaba committed Feb 1, 2021
1 parent 75c649a commit d1ca84c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Filesystem/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public function makePathRelative($endPath, $startPath)

$startPathArr = $splitPath($startPath);
$endPathArr = $splitPath($endPath);
$pathEnd = str_ends_with($endPath, '/') ? '/' : '';
$pathEnd = substr($endPath, -1) === '/' ? '/' : '';

if ($endDriveLetter && $startDriveLetter && $endDriveLetter != $startDriveLetter) {
// End path is on another drive, so no relative path exists
Expand Down

0 comments on commit d1ca84c

Please sign in to comment.