We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit f7a3e508 authored by Brion Vibber's avatar Brion Vibber

Check profile->update() result against false exactly; we may legitimately get...

Check profile->update() result against false exactly; we may legitimately get 0 back if no rows were changed. DB objects normally would return true, but the comparisons aren't 100% reliable when we've got numbers which could be ints or strings or floats.
Caused failures saving profile settings with Geonames plugin enabled; the lat/lon/id fields would get re-set with freshly looked up values which no longer matched the previous values as far as the data object could tell, but which saved as the same ol' numbers.
parent 69abde6e
......@@ -323,7 +323,7 @@ class ProfilesettingsAction extends AccountSettingsAction
$result = $profile->update($orig_profile);
if (!$result) {
if ($result === false) {
common_log_db_error($profile, 'UPDATE', __FILE__);
$this->serverError(_('Couldn\'t save profile.'));
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment