Fix deprecated null value for file_exists() on PHP 8.1 (#5838)

* Fix deprecated null value for `file_exists()` on PHP 8.1

* Update CHANGELOG.md (#5838)
This commit is contained in:
Yuriy Bakhtin 2022-08-11 22:06:04 +03:00 committed by GitHub
parent e45513c8dd
commit 4dd841d1a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ HumHub Changelog
- Fix #5832: Exception in file open dialog when last update user no longer exists
- Fix #5814: Fix numerated lists in mail summary content
- Fix #5830: Fix cron job of search index rebuilding
- Fix #5838: Fix deprecated null value for `file_exists()` on PHP 8.1
1.12.0 (July 27, 2022)
----------------------

View File

@ -58,7 +58,7 @@ class DefaultViewPathRenderer extends \humhub\components\rendering\ViewPathRende
{
$viewFile = parent::getViewFile($viewable);
if (!file_exists($viewFile) && $this->defaultViewPath) {
if (($viewFile === null || !file_exists($viewFile)) && $this->defaultViewPath) {
$viewFile = Yii::getAlias($this->defaultViewPath) . '/' . $this->suffix($viewable->getViewName());
}