Use case where `$themeInfo` in manager file can be null
Bricklou opened this issue · 0 comments
Bricklou commented
I found a bug while trying to use the fallback as a default theme.
Since there is no theme specified, the app crash because $themeInfo
line 204 of src/Managers/Theme.php
is null.
To prevent this, a check should be done:
if (!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;
return $fullPath;
}