diff --git a/modules/backend/widgets/Filter.php b/modules/backend/widgets/Filter.php index c37561a3f2..4df0ba8eb8 100644 --- a/modules/backend/widgets/Filter.php +++ b/modules/backend/widgets/Filter.php @@ -687,8 +687,8 @@ public function removeScope($scopeName) */ protected function makeFilterScope($name, $config) { - $label = $config['label'] ?? null; - $scopeType = $config['type'] ?? null; + $label = $config['label'] ?? ''; + $scopeType = $config['type'] ?? ''; $scope = new FilterScope($name, $label); $scope->displayAs($scopeType, $config); diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index 8f13eaa3c6..a3c48befcf 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -926,7 +926,7 @@ protected function makeListColumn($name, $config) $config['searchable'] = false; } - $columnType = $config['type'] ?? null; + $columnType = $config['type'] ?? ''; $column = new ListColumn($name, $label); $column->displayAs($columnType, $config); diff --git a/modules/system/classes/SettingsManager.php b/modules/system/classes/SettingsManager.php index 0f7993f8b8..affa52a1b0 100644 --- a/modules/system/classes/SettingsManager.php +++ b/modules/system/classes/SettingsManager.php @@ -357,7 +357,7 @@ public function getContext() { return (object) [ 'itemCode' => $this->contextItemCode, - 'owner' => strtolower($this->aliases[$this->contextOwner] ?? $this->contextOwner), + 'owner' => strtolower($this->aliases[$this->contextOwner] ?? ($this->contextOwner ?? '')), ]; } diff --git a/modules/system/helpers/DateTime.php b/modules/system/helpers/DateTime.php index 9401dfb5b1..2fc289918f 100644 --- a/modules/system/helpers/DateTime.php +++ b/modules/system/helpers/DateTime.php @@ -130,6 +130,6 @@ public static function momentFormat($format) $replacements['\\'.$from] = '['.$from.']'; } - return strtr($format, $replacements); + return strtr($format ?? '', $replacements); } } diff --git a/modules/system/partials/_settings_menu_items.htm b/modules/system/partials/_settings_menu_items.htm index bb9f7e0442..8bf68fd630 100644 --- a/modules/system/partials/_settings_menu_items.htm +++ b/modules/system/partials/_settings_menu_items.htm @@ -2,7 +2,7 @@ $context = System\Classes\SettingsManager::instance()->getContext(); $collapsedGroups = explode('|', - isset($_COOKIE['sidenav_treegroupStatus']) ? $_COOKIE['sidenav_treegroupStatus'] : null + isset($_COOKIE['sidenav_treegroupStatus']) ? $_COOKIE['sidenav_treegroupStatus'] : '' ); ?> @@ -28,4 +28,4 @@