From 10795cf0960a37ac8fbea13ac2f910518b4f4f76 Mon Sep 17 00:00:00 2001 From: Colin O'Dell Date: Tue, 2 Oct 2018 08:07:35 -0400 Subject: [PATCH] Remove redundant path check The first `if` statement in this method already performs this same check, so the expression here always evaluated to `true`. --- src/Symfony/Component/HttpFoundation/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 85b5a53f4f..212722ed13 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1120,7 +1120,7 @@ class Request } $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); - $targetDirs = explode('/', isset($path[0]) && '/' === $path[0] ? substr($path, 1) : $path); + $targetDirs = explode('/', substr($path, 1)); array_pop($sourceDirs); $targetFile = array_pop($targetDirs);