mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17493] Improve handling of nullable start parameter
PHPBB-17493
This commit is contained in:
parent
27550ce59b
commit
54d8a49e70
1 changed files with 2 additions and 2 deletions
|
@ -101,14 +101,14 @@ class remove_jabber extends migration
|
|||
];
|
||||
}
|
||||
|
||||
public function move_jabber_to_email_notifications(?int $start = 0)
|
||||
public function move_jabber_to_email_notifications(?int $start)
|
||||
{
|
||||
$limit = 1000;
|
||||
|
||||
$sql = 'UPDATE ' . $this->tables['user_notifications'] . '
|
||||
SET ' . $this->db->sql_build_array('UPDATE', ['method' => 'notification.method.email']) . "
|
||||
WHERE method = 'notification.method.jabber'";
|
||||
$this->db->sql_query_limit($sql, $limit, $start);
|
||||
$this->db->sql_query_limit($sql, $limit, $start ?: 0);
|
||||
|
||||
return $this->db->sql_affectedrows() < $limit ? true : $start + $limit;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue