mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 07:58:56 +02:00
[ticket/16605] Fix possible SQL error on user registration
mysqli_insert_id() returns 0 if there was no previous query on the connection or if the query did not update an AUTO_INCREMENT value for some reason. PHPBB3-16605
This commit is contained in:
parent
6b92f23c81
commit
00849941c3
@ -424,7 +424,7 @@ class ucp_register
|
|||||||
$user_id = user_add($user_row, $cp_data);
|
$user_id = user_add($user_row, $cp_data);
|
||||||
|
|
||||||
// This should not happen, because the required variables are listed above...
|
// This should not happen, because the required variables are listed above...
|
||||||
if ($user_id === false)
|
if ((bool) $user_id === false)
|
||||||
{
|
{
|
||||||
trigger_error('NO_USER', E_USER_ERROR);
|
trigger_error('NO_USER', E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user