fix PHP 8.0 TypeError: array_key_exists(): Argument #2 ($array) must be of type array, bool given

This commit is contained in:
Ralf Becker 2021-12-07 08:33:12 +02:00
parent d5f53af8b9
commit 057c5bf6f7

View File

@ -597,7 +597,7 @@ class calendar_ui
// App might have multiple hooks, let it specify something else // App might have multiple hooks, let it specify something else
$app = $data['selects']['app'] ?: $app; $app = $data['selects']['app'] ?: $app;
if(array_key_exists('sidebox_template', $data)) if (is_array($data) && array_key_exists('sidebox_template', $data))
{ {
$cont['integration'][] = ['template' => $data['sidebox_template'], 'app' => $app]; $cont['integration'][] = ['template' => $data['sidebox_template'], 'app' => $app];
} }