]> git.mxchange.org Git - friendica.git/commitdiff
2) Refactor App->config[] into Core\PConfig
authorPhilipp Holzer <admin@philipp.info>
Sun, 3 Feb 2019 18:05:44 +0000 (19:05 +0100)
committerPhilipp Holzer <admin@philipp.info>
Sun, 3 Feb 2019 18:05:44 +0000 (19:05 +0100)
src/Core/Config/JITPConfigAdapter.php
src/Core/PConfig.php

index 4992068f60cbe7662791b0b41e10f10f78c6ca8b..ac9a56076c98e6a189a1dbadfba4d31a8664c0e0 100644 (file)
@@ -28,7 +28,7 @@ class JITPConfigAdapter implements IPConfigAdapter
                        }
                } else if ($cat != 'config') {
                        // Negative caching
-                       PConfig::setPConfigValue($uid, $cat, "!<unset>!");
+                       PConfig::setPConfigValue($uid, $cat, null, "!<unset>!");
                }
                DBA::close($pconfigs);
        }
index 7104ce83dcfb77b6570cd3c6cc0bb67a648f19bb..75403aaebe8cc82702217e247c73a6afd87eccf3 100644 (file)
@@ -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;
+               }
        }
 
        /**