Skip to content

Commit

Permalink
ilStaticCache::set() must return bool
Browse files Browse the repository at this point in the history
Hi Fabian,

a PHP Fatal Error occurs when performing setup command 'migrate':

PHP Fatal error:  Uncaught ILIAS\Setup\UnachievableException: Problem in DB-Update: 0 Return value of ilStaticCache::set() must be of the type bool, array returned in /***/trunk8/Services/GlobalCache/classes/Static/class.ilStaticCache.php:33#0 /***/trunk8/Services/GlobalCache/classes/class.ilGlobalCache.php(307): ilStaticCache->set()
#1 /***/trunk8/Services/Language/classes/class.ilCachedLanguage.php(62): ilGlobalCache->set()
#2 /***/trunk8/Services/Language/classes/class.ilCachedLanguage.php(29): ilCachedLanguage->writeToCache()
#3 /***/trunk8/Services/Language/classes/class.ilCachedLanguage.php(107): ilCachedLanguage->__construct()
#4 /***/trunk8/Services/Language/classes/class.ilLanguage.php(91): ilCachedLanguage::getInstance()
#5 /***/trunk8/Services/Language/classes/class.ilLanguage.php(374): ilLanguage->__construct in /***/trunk8/Services/Database/classes/Setup/class.ilDatabaseUpdatedObjective.php on line 72
  • Loading branch information
Uwe Tesche authored May 3, 2022
1 parent 054f5fd commit 4bfcd46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Services/GlobalCache/classes/Static/class.ilStaticCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function exists(string $key) : bool
*/
public function set(string $key, $serialized_value, int $ttl = null) : bool
{
return self::$cache[$this->getComponent()][$key] = $serialized_value;
self::$cache[$this->getComponent()][$key] = $serialized_value;
return true;
}

/**
Expand Down

0 comments on commit 4bfcd46

Please sign in to comment.