Skip to content

Commit

Permalink
Set property to null instead of unsetting.
Browse files Browse the repository at this point in the history
This avoid triggering Controller::__get() on subsequent access to ViewVarsTrait::$viewClass.
  • Loading branch information
ADmad committed Sep 25, 2018
1 parent 04342bb commit 3c3d86d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/View/ViewVarsTrait.php
Expand Up @@ -74,7 +74,7 @@ public function createView($viewClass = null)
$builder = $this->viewBuilder();
if ($viewClass === null && $builder->getClassName() === null) {
$builder->setClassName($this->viewClass);
unset($this->viewClass);
$this->viewClass = null;
}
if ($viewClass) {
$builder->setClassName($viewClass);
Expand Down

0 comments on commit 3c3d86d

Please sign in to comment.