From 88c52397a6a0f6226b6fd9c875e7e99765ac4535 Mon Sep 17 00:00:00 2001 From: John Cocula Date: Sun, 5 May 2019 14:55:34 +0100 Subject: [PATCH] Fix PHP 7.2 warnings This is logged when running under PHP 7.2: ```log [2019-05-05 14:41:38] (ERROR @ /[...]/core/components/googlestorelocator/model/googlestorelocator/googlestorelocator.class.php : 380) PHP warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) [2019-05-05 14:41:38] (ERROR @ /[...]/core/components/googlestorelocator/model/googlestorelocator/googlestorelocator.class.php : 381) PHP warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) ``` So this fix! --- .../model/googlestorelocator/googlestorelocator.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/components/googlestorelocator/model/googlestorelocator/googlestorelocator.class.php b/core/components/googlestorelocator/model/googlestorelocator/googlestorelocator.class.php index 4102674..ffd50ac 100644 --- a/core/components/googlestorelocator/model/googlestorelocator/googlestorelocator.class.php +++ b/core/components/googlestorelocator/model/googlestorelocator/googlestorelocator.class.php @@ -377,8 +377,8 @@ public function addCache($store) $options = array( xPDO::OPT_CACHE_KEY => 'googlestorelocator', ); - $this->modx->cacheManager->delete($store[id] . '.store.gsl', $options); - $this->modx->cacheManager->set($store[id] . '.store.gsl', $store, 31556926, $options); + $this->modx->cacheManager->delete($store['id'] . '.store.gsl', $options); + $this->modx->cacheManager->set($store['id'] . '.store.gsl', $store, 31556926, $options); }