summaryrefslogtreecommitdiff
path: root/actions/profilesettings.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-11-18 17:36:55 -0800
committerBrion Vibber <brion@pobox.com>2009-11-18 17:36:55 -0800
commitf7a3e508ba8d0f8f9487724f3e417554d1d0b4d8 (patch)
treeae8ca094cb5c5d462bd857b84e2163ef3b2e870c /actions/profilesettings.php
parent69abde6e0cde3f010d993f0a86294fe57154aa4c (diff)
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.
Diffstat (limited to 'actions/profilesettings.php')
-rw-r--r--actions/profilesettings.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/actions/profilesettings.php b/actions/profilesettings.php
index 0a0cc5997..359664096 100644
--- a/actions/profilesettings.php
+++ b/actions/profilesettings.php
@@ -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;