]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix error when editing OAuth app registration and only changing the icon.
authorBrion Vibber <brion@pobox.com>
Mon, 20 Sep 2010 23:57:07 +0000 (16:57 -0700)
committerBrion Vibber <brion@pobox.com>
Mon, 20 Sep 2010 23:57:07 +0000 (16:57 -0700)
actions/editapplication.php

index b25457069c7fd9ceee341bd9e4ed1bbafe4747d4..477bcd6f0b25b79649b2994310e5237de065ca02 100644 (file)
@@ -253,7 +253,10 @@ class EditApplicationAction extends OwnerDesignAction
 
         $result = $this->app->update($orig);
 
-        if (!$result) {
+        // Note: 0 means no rows changed, which can happen if the only
+        // thing we changed was the icon, since it's not altered until
+        // the next step.
+        if ($result === false) {
             common_log_db_error($this->app, 'UPDATE', __FILE__);
             $this->serverError(_('Could not update application.'));
         }