Browse Source

Merge pull request #6721 from isaacaskew/patch-1

Update View.php to avoid setting variables that are never used.
Mark Story 10 years ago
parent
commit
123ee7962d
1 changed files with 3 additions and 4 deletions
  1. 3 4
      src/View/View.php

+ 3 - 4
src/View/View.php

@@ -494,11 +494,10 @@ class View implements EventDispatcherInterface
             return $this->Blocks->get('content');
         }
 
-        if (empty($content)) {
-            $content = $this->Blocks->get('content');
-        } else {
-            $this->Blocks->set('content', $content);
+        if (!empty($content)) {
+             $this->Blocks->set('content', $content);
         }
+
         $this->dispatchEvent('View.beforeLayout', [$layoutFileName]);
 
         $title = $this->Blocks->get('title');