From 0882f298db23a93ce960ae1b475c3f7bd6ed5a0b Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sun, 21 May 2023 11:59:45 +0100 Subject: [PATCH] [REF][PHP8.2] Only clear cache values if property exists --- tests/phpunit/CRM/Core/BAO/CacheTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/CRM/Core/BAO/CacheTest.php b/tests/phpunit/CRM/Core/BAO/CacheTest.php index a34da16c81..c11a7912c7 100644 --- a/tests/phpunit/CRM/Core/BAO/CacheTest.php +++ b/tests/phpunit/CRM/Core/BAO/CacheTest.php @@ -76,7 +76,9 @@ class CRM_Core_BAO_CacheTest extends CiviUnitTestCase { // read is correct. CRM_Utils_Cache::$_singleton = NULL; - $this->a->values = []; + if (property_exists($this->a, 'values')) { + $this->a->values = []; + } $return_2 = $this->a->get('testSetGetItem'); $this->assertEquals($originalValue, $return_2); } -- 2.25.1