mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Add array type check on cache returned value
This commit is contained in:
@@ -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()] = [
|
||||
|
Reference in New Issue
Block a user