diff --git a/components/PhpPageContainer.php b/components/PhpPageContainer.php index 834a5f06..0832c8b6 100644 --- a/components/PhpPageContainer.php +++ b/components/PhpPageContainer.php @@ -92,7 +92,12 @@ public function getAllowedPhpViewFileSelection($path = false) return []; } - $files = FileHelper::findFiles($this->getPhpViewPathByView(), [ + $dirPath = $this->getPhpViewPathByView(); + if (!is_dir($dirPath)) { + return []; + } + + $files = FileHelper::findFiles($dirPath, [ 'only' => ['*.php'], 'recursive' => false ]); diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ecb42511..b364380c 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,11 @@ Changelog ========= +1.1.1 (November 12, 2020) +------------------------- +- Fix #151: Avoid error on creating of custom php page with not existing directory from old settings + + 1.1.0 (November 3, 2020) ------------------------ The default folders for PHP custom pages were changed. diff --git a/module.json b/module.json index e691751d..6e475be7 100644 --- a/module.json +++ b/module.json @@ -3,7 +3,7 @@ "name": "Custom Pages", "description": "Allows admins to create custom pages (html or markdown) or external links to various navigations (e.g. top navigation, account menu).", "keywords": ["pages", "custom", "iframe", "markdown", "link", "navigation", "spaces"], - "version": "1.1.0", + "version": "1.1.1", "homepage": "https://github.com/humhub/humhub-modules-custom-pages", "humhub": { "minVersion": "1.7"