From 60d503a75cd1667d791ee9831aaacfb89cf3082d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D?= Date: Sun, 13 Mar 2022 20:00:32 +0100 Subject: [PATCH] * [FIX] Wrong return type. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rubén D --- lib/SP/Mvc/View/Template.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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; } /**