db_prefs: don't report missing prefs if die_on_error is false

This commit is contained in:
Andrew Dolgov 2019-04-10 13:39:07 +03:00
parent 9e200f2cf0
commit e31e9ae04d
1 changed files with 2 additions and 2 deletions

View File

@ -90,8 +90,8 @@ class Db_Prefs {
return $this->convert($value, $type_name);
} else {
user_error("Fatal error, unknown preferences key: $pref_name (owner: $user_id)", $die_on_error ? E_USER_ERROR : E_USER_WARNING);
} else if ($die_on_error) {
user_error("Fatal error, unknown preferences key: $pref_name (owner: $user_id)", E_USER_ERROR);
return null;
}
}