Skip to content

Commit d1ca84c

Browse files
committed
Replace str_ends_with with substr to maintain compatibility
1 parent 75c649a commit d1ca84c

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
@@ -479,7 +479,7 @@ public function makePathRelative($endPath, $startPath)
479479

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

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy