diff --git a/lib/SP/Mvc/View/Template.php b/lib/SP/Mvc/View/Template.php index 4c69ca9f..398923fa 100644 --- a/lib/SP/Mvc/View/Template.php +++ b/lib/SP/Mvc/View/Template.php @@ -300,18 +300,13 @@ final class Template * Overloading para eliminar una variable del array de variables de la plantilla pasado como * atributo dinĂ¡mico de la clase */ - public function __unset(string $name): Template + public function __unset(string $name): void { if (!$this->vars->exists($name)) { logger(sprintf(__('Unable to unset "%s" variable'), $name)); - -// throw new InvalidArgumentException(sprintf(__('Unable to unset "%s" variable'), $name)); - return $this; + } else { + $this->vars->remove($name); } - - $this->vars->remove($name); - - return $this; } /**