From 7a3486563cb8fff8fc0788c11af348bf11c77595 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sat, 17 Dec 2022 00:20:43 +1300 Subject: [PATCH] Only cache a Principal if we've actually loaded something. --- inc/Principal.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/Principal.php b/inc/Principal.php index f23bac0d..7ad76d7e 100644 --- a/inc/Principal.php +++ b/inc/Principal.php @@ -234,7 +234,10 @@ class Principal { } $this->assignRowValues($row); $this->url = ConstructURL( $this->dav_name, true ); - $row = $cache->set($this->cacheNs, $this->cacheKey, $row, 864000 ); + + if (isset($this->cacheNs)) + $cache->set($this->cacheNs, $this->cacheKey, $row, 864000 ); + return $this; }