From b34df4afe525549242d1f2167c9200a95f663c09 Mon Sep 17 00:00:00 2001 From: Teranode Date: Mon, 4 Apr 2022 20:12:26 -0400 Subject: [PATCH 1/5] Can't pass null to non-nullable arguments This is in regards to: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg I'm getting this deprecation warning throughout all of winter with php 8.1 and it's happening in both winter and storm --- modules/backend/widgets/Lists.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); From 64361ecb7a22d8680d7c17713d5cd2a668a42a94 Mon Sep 17 00:00:00 2001 From: Teranode Date: Mon, 4 Apr 2022 20:29:29 -0400 Subject: [PATCH 2/5] Update _settings_menu_items.htm --- modules/system/partials/_settings_menu_items.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 @@

- \ No newline at end of file + From 0273c9f372b3949bc0ccc66713bd65bd93651f27 Mon Sep 17 00:00:00 2001 From: Teranode Date: Mon, 11 Apr 2022 22:18:38 -0700 Subject: [PATCH 3/5] Update Filter.php --- modules/backend/widgets/Filter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); From 3c6329bbd9cb115c649ee5b962b645b4e3ab0c40 Mon Sep 17 00:00:00 2001 From: Teranode Date: Tue, 12 Apr 2022 01:14:43 -0700 Subject: [PATCH 4/5] Update DateTime.php --- modules/system/helpers/DateTime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } From 283cb6c30ac2931eb40aa40f808008dd1972bf43 Mon Sep 17 00:00:00 2001 From: Teranode Date: Tue, 12 Apr 2022 01:22:43 -0700 Subject: [PATCH 5/5] Update SettingsManager.php --- modules/system/classes/SettingsManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ?? '')), ]; }