diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index fa05dbf1b3..8be9b27f20 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -104,6 +104,7 @@
[Fix] Allow friends/foes to be added and removed at the same time. (Bug #46255 - Patch by bantu)
[Fix] Only change topic/post icon if icons are enabled and user is allowed to. (Bug #46355 - Patch by bantu)
[Fix] Fix saving custom profile fields in ACP if Oracle used (Bug #46015)
+ [Fix] Make view_log() more resilient to corrupt serialized data. (Bug #46545)
[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.
[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)
[Change] Template engine now permits to a limited extent variable includes.
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index a1f34792e0..a8e49a12bc 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2419,7 +2419,8 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
if (!empty($row['log_data']))
{
- $log_data_ary = unserialize($row['log_data']);
+ $log_data_ary = @unserialize($row['log_data']);
+ $log_data_ary = ($log_data_ary === false) ? array() : $log_data_ary;
if (isset($user->lang[$row['log_operation']]))
{
@@ -2442,7 +2443,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
$log[$i]['action'] = bbcode_nl2br(censor_text($log[$i]['action']));
}
}
- else
+ else if (!empty($log_data_ary))
{
$log[$i]['action'] .= '
' . implode('', $log_data_ary);
}