Skip to content

Commit 6a831d6

Browse files
committed
Fix phpBB4 crashes
1 parent 6e4a05e commit 6a831d6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

includes/qi_populate.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ private function save_users()
664664
foreach ($this->user_arr as $user)
665665
{
666666
$email = $user['username_clean'] . $this->email_domain;
667-
$sql_ary[] = array(
667+
$sql_ary[] = array_merge([
668668
'user_id' => $user['user_id'],
669669
'username' => $user['username'],
670670
'username_clean' => $user['username_clean'],
@@ -684,9 +684,11 @@ private function save_users()
684684
'user_passchg' => $user['user_passchg'],
685685
'user_options' => 230271,
686686
'user_full_folder' => PRIVMSGS_NO_BOX,
687-
'user_notify_type' => NOTIFY_EMAIL,
688687
'user_dateformat' => 'M jS, ’y, H:i',
689688
'user_sig' => '',
689+
], !qi::phpbb_branch('4.0') ?
690+
['user_notify_type' => defined('NOTIFY_EMAIL') ? NOTIFY_EMAIL : 0] :
691+
[]
690692
);
691693

692694
$count = count($sql_ary) - 1;

0 commit comments

Comments
 (0)