From b0e90f0df121f0982cd6b84ed29f3b5e4f0a768f Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 6 Jan 2012 17:26:26 +0100 Subject: [PATCH] Fix #166 : empty cache on subdef generation --- lib/classes/record/adapter.class.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/classes/record/adapter.class.php b/lib/classes/record/adapter.class.php index 3a3402567c..68d4e90426 100644 --- a/lib/classes/record/adapter.class.php +++ b/lib/classes/record/adapter.class.php @@ -1669,14 +1669,11 @@ class record_adapter implements record_Interface, cache_cacheableInterface echo $e->getMessage() . "\n"; } - if (!array_key_exists($subdefname, $record_subdefs)) + if (array_key_exists($subdefname, $record_subdefs)) { - continue; + $record_subdefs[$subdefname]->delete_data_from_cache(); } - $record_subdefs[$subdefname]->delete_data_from_cache(); - - $this->delete_data_from_cache(self::CACHE_SUBDEFS); try { $subdef = $this->get_subdef($subdefname);