From 9537b4702311781130fc1a1dd97875d70f150ba8 Mon Sep 17 00:00:00 2001 From: Louis Bailleau Date: Fri, 30 Jul 2021 09:54:05 +0200 Subject: [PATCH] Prevent errors when `$themeInfo` is null Fixe #56 --- src/Managers/Theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Managers/Theme.php b/src/Managers/Theme.php index 57f1e85..c12cfc6 100755 --- a/src/Managers/Theme.php +++ b/src/Managers/Theme.php @@ -212,7 +212,7 @@ public function getFullPath($path) $assetPath = $this->config['theme.folders.assets'].DIRECTORY_SEPARATOR; $fullPath = $themePath.$assetPath.$path; - if (!file_exists($fullPath) && $themeInfo->has('parent') && !empty($themeInfo->get('parent'))) { + if (isset($themeInfo) && !file_exists($fullPath) && $themeInfo->has('parent') && !empty($themeInfo->get('parent'))) { $themePath = str_replace(base_path().DIRECTORY_SEPARATOR, '', $this->getThemeInfo($themeInfo->get('parent'))->get('path')).DIRECTORY_SEPARATOR; $fullPath = $themePath.$assetPath.$path;