From: Mikael Nordfeldth Date: Sun, 20 Oct 2013 15:15:46 +0000 (+0200) Subject: Strict type check against false in User_group X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9811783f19c09f674a5dbc3869fe71da8d53594b;p=quix0rs-gnu-social.git Strict type check against false in User_group --- diff --git a/classes/User_group.php b/classes/User_group.php index 5cae07bf29..bbae402091 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -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.'));