From e6e0baab1219d3b1ebd0e6367f4f45c0365b629a Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 23 Jul 2021 23:16:03 +0530 Subject: [PATCH] feat(template): fix incorrect if condition --- src/Appwrite/Template/Template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Template/Template.php b/src/Appwrite/Template/Template.php index 5c0c7c9db..a9e8078d6 100644 --- a/src/Appwrite/Template/Template.php +++ b/src/Appwrite/Template/Template.php @@ -22,7 +22,7 @@ class Template extends View */ public static function fromFile(string $path): self { - if (\is_readable($path)) { + if (!\is_readable($path)) { throw new Exception("$path view template is not readable."); } @@ -51,7 +51,7 @@ class Template extends View if (empty($html)) { throw new Exception('Empty HTML string'); } - + $template = new Template(); return $template->setHtml($html); }