Unknown named parameter $log_data in /var/www/phpbb/phpbb/log/log.php

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
MichaIng
Registered User
Posts: 17
Joined: Tue Aug 04, 2020 2:35 pm
Contact:

Re: Unknown named parameter $log_data in /var/www/phpbb/phpbb/log/log.php

Post by MichaIng »

And now the issue re-appeared. I really cannot see any suspicious log entry. I removed the last few ones, so far without success. Now I think it might be better to somehow analyse the log entries, differently than doing a copy&paste from the select query? I did mysqlcheck -o phpbb3 phpbb_log on it, but that is all fine and the re-creation was without effect. Does anyone have suggestions what to have a look at or how to debug?
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Unknown named parameter $log_data in /var/www/phpbb/phpbb/log/log.php

Post by 3Di »

OPEN the file FORUM_ROOT\phpbb\log\log.php

FIND at line 698
$log[$i]['action'] = call_user_func_array(array($this->user, 'lang'), $lang_arguments);

REPLACE WITH
$log[$i]['action'] = call_user_func_array(array($this->user, 'lang'), array_values($lang_arguments));

Not tested since I can not replicate your issue with PHP 8.0.3 or 8.0.7.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
MichaIng
Registered User
Posts: 17
Joined: Tue Aug 04, 2020 2:35 pm
Contact:

Re: Unknown named parameter $log_data in /var/www/phpbb/phpbb/log/log.php

Post by MichaIng »

That solves the issue indeed :). Out of interest, can you explain the issue? If I understand it correctly, array_values() basically reorders and translates non-numerical or multi-dimensional arrays into flattened numerical arrays, but if I see the previous array_merge() and array() calls, it is numerical already, and it looks like gaps are tried to be filled here. That block is probably obsolete when using array_values().
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Unknown named parameter $log_data in /var/www/phpbb/phpbb/log/log.php

Post by 3Di »

MichaIng wrote: Tue Jun 15, 2021 3:24 pm That solves the issue indeed :).
Thanks for feedback.

I encountered similar use cases at least three times with PHP 8 (just related to array_merge() and the subsequent call_user_func_array()), and solved them. About the explanation I have already provided some hint in my Pull Request, you know. It should be ok but still waiting for the developers to give some feedback.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
MichaIng
Registered User
Posts: 17
Joined: Tue Aug 04, 2020 2:35 pm
Contact:

Re: Unknown named parameter $log_data in /var/www/phpbb/phpbb/log/log.php

Post by MichaIng »

FTR: The proposed fix has been merged: https://github.com/phpbb/phpbb/pull/6234
The Delete My Account extension turned out to be the culprit in my case, and the fix is hence more a workaround or graceful handling for plugins which create log entries containing named arrays, while it's good to fix that in the extension. Delete My Account is pretty simple to fix (see pull request linked above), but sadly it is not maintained anymore :(.
Post Reply

Return to “[3.3.x] Support Forum”