Skip to content
Snippets Groups Projects
Commit 4f88e131 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

ensure schemes array is always an array, fixes #4134

Closes #4134

Merge request studip/studip!3512
parent 4c9e0b51
No related branches found
No related tags found
No related merge requests found
...@@ -416,7 +416,7 @@ class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate ...@@ -416,7 +416,7 @@ class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate
{ {
if (self::$schemes === null) { if (self::$schemes === null) {
$cache = \Studip\Cache\Factory::getCache(); $cache = \Studip\Cache\Factory::getCache();
self::$schemes = unserialize($cache->read('DB_TABLE_SCHEMES')); self::$schemes = unserialize($cache->read('DB_TABLE_SCHEMES')) ?: [];
} }
if (!isset(self::$schemes[$db_table])) { if (!isset(self::$schemes[$db_table])) {
$db = DBManager::get()->query("SHOW COLUMNS FROM $db_table"); $db = DBManager::get()->query("SHOW COLUMNS FROM $db_table");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment