]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Strict type check against false in User_group
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 20 Oct 2013 15:15:46 +0000 (17:15 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 20 Oct 2013 15:15:46 +0000 (17:15 +0200)
classes/User_group.php

index 5cae07bf292bd55de835579bfe9ba0a487de3792..bbae40209178c3573582247915485d703ddafff4 100644 (file)
@@ -630,7 +630,7 @@ class User_group extends Managed_DataObject
 
         $profile->query('BEGIN');
         $id = $profile->insert();
-        if (empty($id)) {
+        if ($id === false) {
             $profile->query('ROLLBACK');
             throw new ServerException(_('Profile insertion failed'));
         }
@@ -654,7 +654,7 @@ class User_group extends Managed_DataObject
 
             $result = $group->insert();
 
-            if (!$result) {
+            if ($result === false) {
                 common_log_db_error($group, 'INSERT', __FILE__);
                 // TRANS: Server exception thrown when creating a group failed.
                 throw new ServerException(_('Could not create group.'));