Prechádzať zdrojové kódy

Check if cache_warmer service is available before doing the actual cache warmup

Miha Vrhovnik 13 rokov pred
rodič
commit
6b872cfa40

+ 1 - 1
src/Symfony/Component/HttpKernel/Kernel.php

@@ -553,7 +553,7 @@ abstract class Kernel implements KernelInterface
         $this->container = new $class();
         $this->container->set('kernel', $this);
 
-        if (!$fresh) {
+        if (!$fresh && $this->container->has('cache_warmer')) {
             $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir'));
         }
     }