-
Bug
-
Resolution: Fixed
-
Major
-
3.1.0-b2
-
None
In \phpbb\log\log::get_logs, lines 516 to 531 we have that :
// Check if there are more occurrences of % than
|
// arguments, if there are we fill out the arguments
|
// array. It doesn't matter if we add more arguments than
|
// placeholders.
|
$num_args = 0;
|
if (!is_array($this->user->lang[$row['log_operation']]))
|
{
|
$num_args = substr_count($log[$i]['action'], '%');
|
}
|
else
|
{
|
foreach ($this->user->lang[$row['log_operation']] as $case => $plural_string)
|
{
|
$num_args = max($num_args, substr_count($plural_string, '%'));
|
}
|
}
|
The line 523 is wrong, we are counting the number of placeholders in the key instead of his value. So this line should be:
$num_args = substr_count($this->user->lang[$row['log_operation']], '%');
|
- blocks
-
PHPBB-11942 Delete post/topic reason should be added to the generated log entry
- Closed
-
PHPBB-12445 Disapproved post/topic: the name of the poster should be added to the generated log entry
- Closed