From aea42b55fe56ef75794371a23c1157e9644492fc Mon Sep 17 00:00:00 2001 From: Sama34 Date: Tue, 3 Sep 2024 08:58:30 -0700 Subject: [PATCH] Fix phpBB3 warnings --- boards/phpbb3/threads.php | 2 +- boards/phpbb3/users.php | 4 ++-- resources/class_converter_module.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/boards/phpbb3/threads.php b/boards/phpbb3/threads.php index 81dc980..bc13a6a 100644 --- a/boards/phpbb3/threads.php +++ b/boards/phpbb3/threads.php @@ -87,7 +87,7 @@ function get_poll_pid($tid) $results = $this->old_db->fetch_field($query, "poll_option_id"); $this->old_db->free_result($query); - $this->get_poll_pid_cache[$tid] = $results; + $this->get_poll_pid_cache[$tid] = (int)$results; return $results; } diff --git a/boards/phpbb3/users.php b/boards/phpbb3/users.php index 8b336c2..b4653ba 100644 --- a/boards/phpbb3/users.php +++ b/boards/phpbb3/users.php @@ -71,7 +71,7 @@ function convert_data($data) $insert_data['regdate'] = $data['user_regdate']; $insert_data['lastactive'] = $data['user_lastvisit']; $insert_data['lastvisit'] = $data['user_lastvisit']; - $insert_data['website'] = $data['user_website']; + $insert_data['website'] = $data['user_website'] ?? ''; $insert_data['lastpost'] = $data['user_lastpost_time']; $birthday = ''; @@ -125,7 +125,7 @@ function convert_data($data) // phpBB 3.1 $insert_data['timezone'] = get_timezone($data['user_timezone']); } - $insert_data['dst'] = $data['user_dst']; + $insert_data['dst'] = $data['user_dst'] ?? 0; $insert_data['signature'] = encode_to_utf8($this->bbcode_parser->convert($data['user_sig'], $data['user_sig_bbcode_uid']), "users", "users"); $insert_data['regip'] = my_inet_pton($data['user_ip']); $insert_data['lastip'] = my_inet_pton($data['user_ip']); diff --git a/resources/class_converter_module.php b/resources/class_converter_module.php index 9602040..ba552dc 100644 --- a/resources/class_converter_module.php +++ b/resources/class_converter_module.php @@ -412,8 +412,8 @@ public function prepare_insert_array($values, $table='') { $this->board->set_column_warning_in_progress( 'entry', $table, $key, - $lang->sprintf($lang->warning_prepare_data_mismatched_column, $import_session['module'], TABLE_PREFIX.$table, $key, $column['def_type'], 'STRING'), - $lang->sprintf($lang->warning_prepare_data_mismatched_column, $import_session['module'], TABLE_PREFIX.$table, $key, $column['def_type'], 'STRING') + $lang->sprintf($lang->warning_prepare_data_mismatched_column, $import_session['module'], TABLE_PREFIX.$table, $key, $column['def_type'] ?? '', 'STRING'), + $lang->sprintf($lang->warning_prepare_data_mismatched_column, $import_session['module'], TABLE_PREFIX.$table, $key, $column['def_type'] ?? '', 'STRING') ); }