From db5eb0777a22e3b737a026a1c05da87afc612f9f Mon Sep 17 00:00:00 2001 From: JediKev Date: Thu, 7 May 2020 16:25:24 -0500 Subject: [PATCH] issue: Flush Model Cache This addresses an issue where `ModelMeta::flushModelCache()` doesn't work correctly. In theory, it's supposed to clear all APCu cache. This is especially helpful for Upgrades by preventing the selection of data/structures that don't exist anymore. This is due to the fact that when we updated `apc_clear_cache()` to `apcu_clear_cache()` we forgot to remove the argument. `apcu_clear_cache()` takes no arguments and you would think that PHP would be smart enough to void the argument but apparently it's not. This removes the argument so that it works properly and clears all APCu cache. --- include/class.orm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class.orm.php b/include/class.orm.php index 73c37f9467..6c4d573a11 100644 --- a/include/class.orm.php +++ b/include/class.orm.php @@ -298,7 +298,7 @@ function inspectFields() { static function flushModelCache() { if (self::$model_cache) - @apcu_clear_cache('user'); + @apcu_clear_cache(); } }