From f40c57fc204ff47a3cf9f7eab75e8a635566275c Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sun, 3 Feb 2019 19:05:44 +0100 Subject: [PATCH] 2) Refactor App->config[] into Core\PConfig --- src/Core/Config/JITPConfigAdapter.php | 2 +- src/Core/PConfig.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Core/Config/JITPConfigAdapter.php b/src/Core/Config/JITPConfigAdapter.php index 4992068f60..ac9a56076c 100644 --- a/src/Core/Config/JITPConfigAdapter.php +++ b/src/Core/Config/JITPConfigAdapter.php @@ -28,7 +28,7 @@ class JITPConfigAdapter implements IPConfigAdapter } } else if ($cat != 'config') { // Negative caching - PConfig::setPConfigValue($uid, $cat, "!!"); + PConfig::setPConfigValue($uid, $cat, null, "!!"); } DBA::close($pconfigs); } diff --git a/src/Core/PConfig.php b/src/Core/PConfig.php index 7104ce83dc..75403aaebe 100644 --- a/src/Core/PConfig.php +++ b/src/Core/PConfig.php @@ -203,7 +203,11 @@ class PConfig extends BaseObject self::$config[$uid][$cat] = []; } - self::$config[$uid][$cat][$k] = $value; + if ($k === null) { + self::$config[$uid][$cat] = $value; + } else { + self::$config[$uid][$cat][$k] = $value; + } } /** -- 2.39.5