mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
Fix count() warning
In PHP 7.2 and later you will get a warning if you call count() on null. So either initialize $errors to an empty array here, or use empty() to check it as I have done here.
This commit is contained in:
committed by
Pierrick Le Gall
parent
8573e35b18
commit
f62ee77852
@@ -170,7 +170,7 @@ function register_user($login, $password, $mail_address, $notify_admin=true, &$e
|
||||
);
|
||||
|
||||
// if no error until here, registration of the user
|
||||
if (count($errors) == 0)
|
||||
if (empty($errors))
|
||||
{
|
||||
$insert = array(
|
||||
$conf['user_fields']['username'] => pwg_db_real_escape_string($login),
|
||||
|
||||
Reference in New Issue
Block a user