From 0c2a2bf536ec39b65c9e98927a67a0cabbe76920 Mon Sep 17 00:00:00 2001 From: tiecoders Date: Sun, 7 Apr 2019 01:25:14 +0200 Subject: [PATCH] ASSET-PathPackage-Enhancement - Use parent getUrl method instead of duplicating code. --- src/Symfony/Component/Asset/PathPackage.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Symfony/Component/Asset/PathPackage.php b/src/Symfony/Component/Asset/PathPackage.php index 1fd9926b31..e3cc56c0f7 100644 --- a/src/Symfony/Component/Asset/PathPackage.php +++ b/src/Symfony/Component/Asset/PathPackage.php @@ -53,11 +53,7 @@ class PathPackage extends Package */ public function getUrl($path) { - if ($this->isAbsoluteUrl($path)) { - return $path; - } - - $versionedPath = $this->getVersionStrategy()->applyVersion($path); + $versionedPath = parent::getUrl($path); // if absolute or begins with /, we're done if ($this->isAbsoluteUrl($versionedPath) || ($versionedPath && '/' === $versionedPath[0])) {