1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 17:01:43 +02:00

e_pref::update() accepts existing keys with NULL

e_pref::update() will now update keys' values where the keys have a value of
NULL

Fixes: #3021
This commit is contained in:
Nick Liu
2018-02-02 08:24:31 -06:00
parent 0ab3485a84
commit fbd1283d6e

View File

@@ -240,7 +240,7 @@ class e_pref extends e_front_model
{
return $this;
}
if(isset($this->_data[$pref_name]))
if(array_key_exists($pref_name, $this->_data))
{
if($this->_data[$pref_name] != $value) $this->data_has_changed = true;
$this->_data[$pref_name] = $value;