From 08f243b440f239a5e02ff2afb268ba54a01298e7 Mon Sep 17 00:00:00 2001 From: Florian Krauthan Date: Tue, 24 May 2016 13:56:31 -0700 Subject: [PATCH] Fixed code --- Assetic/Filter/CssURLRewriteFilter.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Assetic/Filter/CssURLRewriteFilter.php b/Assetic/Filter/CssURLRewriteFilter.php index d7bb475..0a1eb76 100644 --- a/Assetic/Filter/CssURLRewriteFilter.php +++ b/Assetic/Filter/CssURLRewriteFilter.php @@ -115,14 +115,10 @@ private function calculateSwitchPath() try { $request = null; - if ($this->container->has('request_stack')) { - - $request = $this->kernel->getContainer()->get('request_stack')->getCurrentRequest(); - - } elseif (method_exists($this->container, 'isScopeActive') && $this->container->isScopeActive('request')) { - - $request = $this->kernel->getContainer()->get('request'); - + if ($this->kernel->getContainer()->has('request_stack')) { + $request = $this->kernel->getContainer()->get('request_stack')->getCurrentRequest(); + } else { + $request = $this->kernel->getContainer()->get('request'); } if (substr($request->getBaseUrl(), -4) != '.php') {