1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-07 19:35:47 +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
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

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;