sforkowany z mirror/friendica
Bugfix: The caching of values didn't really work for boolean values
rodzic
1360a0a003
commit
6bbc0e4c78
|
@ -38,7 +38,7 @@ class Config {
|
||||||
|
|
||||||
// We don't preload "system" anymore.
|
// We don't preload "system" anymore.
|
||||||
// This reduces the number of database reads a lot.
|
// This reduces the number of database reads a lot.
|
||||||
if ($family == 'system') {
|
if ($family === 'system') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ class Config {
|
||||||
|
|
||||||
// Do we have the cached value? Then return it
|
// Do we have the cached value? Then return it
|
||||||
if (isset(self::$cache[$family][$key])) {
|
if (isset(self::$cache[$family][$key])) {
|
||||||
if (self::$cache[$family][$key] == '!<unset>!') {
|
if (self::$cache[$family][$key] === '!<unset>!') {
|
||||||
return $default_value;
|
return $default_value;
|
||||||
} else {
|
} else {
|
||||||
return self::$cache[$family][$key];
|
return self::$cache[$family][$key];
|
||||||
|
@ -141,7 +141,7 @@ class Config {
|
||||||
|
|
||||||
$stored = self::get($family, $key);
|
$stored = self::get($family, $key);
|
||||||
|
|
||||||
if ($stored == $value) {
|
if ($stored === $value) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue