fix php error message

check array before action in array
This commit is contained in:
ptibogxiv 2019-12-17 11:03:49 +01:00 committed by GitHub
parent c37deeeb78
commit 2db062a429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -677,7 +677,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
$globalStatsKey = $groupElement['globalStatsKey'];
$groupElement['globalStats'] = array();
if (in_array($globalStatsKey, $keys))
if (is_array($keys) && in_array($globalStatsKey, $keys))
{
// get key index of stats used in $includes, $classes, $keys, $icons, $titres, $links
$keyIndex = array_search($globalStatsKey, $keys);