mirror of
https://github.com/getgrav/grav.git
synced 2026-07-15 13:53:29 +02:00
Fixed fatal error if system.pages.types is not an array [#2984](https://github.com/getgrav/grav/issues/2984)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
* Fixed deleting page with language code not removing the folder if it was the last language [#3305](https://github.com/getgrav/grav/issues/3305)
|
||||
* Fixed fatal error when using markdown links with `image://` stream [#3285](https://github.com/getgrav/grav/issues/3285)
|
||||
* Fixed `system.languages.session_store_active` not having any effect [#3269](https://github.com/getgrav/grav/issues/3269)
|
||||
* Fixed fatal error if `system.pages.types` is not an array [#2984](https://github.com/getgrav/grav/issues/2984)
|
||||
|
||||
# v1.7.10
|
||||
## 04/06/2021
|
||||
|
||||
@@ -1844,11 +1844,14 @@ abstract class Utils
|
||||
* Wrapper to ensure html, htm in the front of the supported page types
|
||||
*
|
||||
* @param array|null $defaults
|
||||
* @return array|mixed
|
||||
* @return array
|
||||
*/
|
||||
public static function getSupportPageTypes(array $defaults = null)
|
||||
{
|
||||
$types = Grav::instance()['config']->get('system.pages.types', $defaults);
|
||||
if (!is_array($types)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// remove html/htm
|
||||
$types = static::arrayRemoveValue($types, ['html', 'htm']);
|
||||
|
||||
Reference in New Issue
Block a user