From c2ed8033a6ae061881c759aecd064bd900188d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=BDurek?= Date: Tue, 1 Nov 2016 12:56:40 +0100 Subject: [PATCH] fix $template has to be instance of LR\Template or Nette\Templating\Template, instance of TemplateXXX given. --- src/Brabijan/Images/Macros/Latte.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Brabijan/Images/Macros/Latte.php b/src/Brabijan/Images/Macros/Latte.php index 5b387e4..39c8a7a 100644 --- a/src/Brabijan/Images/Macros/Latte.php +++ b/src/Brabijan/Images/Macros/Latte.php @@ -136,7 +136,7 @@ public function finalize() */ public static function validateTemplateParams($template) { - if (!($template instanceof \Latte\Runtime\Template) || !($template instanceof \Nette\Application\UI\Template)) { + if (!($template instanceof \Latte\Runtime\Template) && !($template instanceof \Nette\Application\UI\Template)) { throw new \InvalidArgumentException('$template has to be instance of LR\Template or Nette\Templating\Template, instance of ' . get_class($template) . ' given.'); }