Strict type check against false in User_group
This commit is contained in:
parent
e868ebfe77
commit
9811783f19
@ -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.'));
|
||||
|
Loading…
Reference in New Issue
Block a user