Skip to content

Commit df87d2b

Browse files
Add guard to not pass null as key to array_key_exists to ensure 8.5 compatibility
1 parent 3ba2ba0 commit df87d2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/Icingadb/Web/Control/ViewModeSwitcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function getViewMode(): string
104104
{
105105
$viewMode = $this->getPopulatedValue($this->getViewModeParam(), $this->getDefaultViewMode());
106106

107-
if (array_key_exists($viewMode, static::$viewModes)) {
107+
if ($viewMode && array_key_exists($viewMode, static::$viewModes)) {
108108
return $viewMode;
109109
}
110110

0 commit comments

Comments
 (0)