diff --git a/lib/classes/phrasea.php b/lib/classes/phrasea.php index 16803fe399..211a150e44 100644 --- a/lib/classes/phrasea.php +++ b/lib/classes/phrasea.php @@ -173,6 +173,9 @@ class phrasea if (!self::$_sbas_labels) { try { self::$_sbas_labels = $app->getApplicationBox()->get_data_from_cache(self::CACHE_SBAS_LABELS); + if (!is_array(self::$_sbas_labels)) { + throw new \Exception('Invalid data retrieved from cache'); + } } catch (\Exception $e) { foreach ($app->getDataboxes() as $databox) { self::$_sbas_labels[$databox->get_sbas_id()] = [