Explorar o código

[Templating] fix problem with PHP 5.4

Fabien Potencier %!s(int64=14) %!d(string=hai) anos
pai
achega
ba9e3dec69
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      src/Symfony/Component/Templating/Helper/SlotsHelper.php

+ 1 - 3
src/Symfony/Component/Templating/Helper/SlotsHelper.php

@@ -51,15 +51,13 @@ class SlotsHelper extends Helper
      */
      */
     public function stop()
     public function stop()
     {
     {
-        $content = ob_get_clean();
-
         if (!$this->openSlots) {
         if (!$this->openSlots) {
             throw new \LogicException('No slot started.');
             throw new \LogicException('No slot started.');
         }
         }
 
 
         $name = array_pop($this->openSlots);
         $name = array_pop($this->openSlots);
 
 
-        $this->slots[$name] = $content;
+        $this->slots[$name] = ob_get_clean();
     }
     }
 
 
     /**
     /**