"fix for bug #1796: Various config values not stored

now only unset or empty strings are not stored, but 0 is"
This commit is contained in:
Ralf Becker 2008-10-27 15:11:15 +00:00
parent f713c095b2
commit ba5d176520

View File

@ -149,7 +149,7 @@ class config
{ {
self::init_db(); self::init_db();
} }
if (empty($value)) if (!isset($value) || $value === '')
{ {
if (isset(self::$configs[$app])) unset(self::$configs[$app][$name]); if (isset(self::$configs[$app])) unset(self::$configs[$app][$name]);
return self::$db->delete(config::TABLE,array('config_app'=>$app,'config_name'=>$name),__LINE__,__FILE__); return self::$db->delete(config::TABLE,array('config_app'=>$app,'config_name'=>$name),__LINE__,__FILE__);