]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Config/PConfiguration.php
Adding ConfigFileSaver and tests
[friendica.git] / src / Core / Config / PConfiguration.php
index 99b1aa14698b17d9b14fc0f57c966b39419c22dc..0d3b0c178c6cb24c02a53c8ec54454e3a096e220 100644 (file)
@@ -77,18 +77,15 @@ class PConfiguration
                                $refresh)) {
                        $dbValue = $this->configAdapter->get($uid, $cat, $key);
 
-                       if ($dbValue !== '!<unset>!') {
+                       if (isset($dbValue)) {
                                $this->configCache->setP($uid, $cat, $key, $dbValue);
                                return $dbValue;
                        }
                }
 
                // use the config cache for return
-               if ($this->configCache->hasP($uid, $cat, $key)) {
-                       return $this->configCache->getP($uid, $cat, $key);
-               } else {
-                       return $default_value;
-               }
+               $result = $this->configCache->getP($uid, $cat, $key);
+               return (isset($result)) ? $result : $default_value;
        }
 
        /**