Fix PHP8 warning

This commit is contained in:
Aleksander Machniak 2023-06-15 14:03:15 +02:00
parent 70810e1f88
commit 4ff91e51de

View file

@ -63,10 +63,10 @@ class RcubeUser extends Base
*/
public function read($key)
{
if (!isset($this->cache[$key])) {
if (!array_key_exists($key, $this->cache)) {
$factors = $this->get_factors();
$this->log(LOG_DEBUG, "RcubeUser::read({$key})");
$this->cache[$key] = $factors[$key];
$this->cache[$key] = $factors[$key] ?? null;
}
return $this->cache[$key];