Support

Admin Tools

#38540 PHP Error

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
4.2.7
PHP version
8.0.27
Admin Tools version
7.2.2

Latest post by tampe125 on Monday, 20 February 2023 08:05 CST

davidascher

 PHP Warning: foreach() argument must be of type array|object, string given in /home/customer/www/peacecoalition.org/public_html/plugins/system/admintools/src/Utility/BlockedRequestHandler.php on line 693

It looks like some very rarely used path got used and needs to be fixed. 

 

 

 

tampe125
Akeeba Staff

Hello,

can you please get inside the Configure WAF page and take a look at the field "Allowed domains" in the tab "Exceptions". If there's any empty field please remove it, then Save and Close and you should be good to go.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

davidascher

I did find an empty field in the list of allowed IP addresses. However, when I first tried to SAVE the configuration I got a message that there was an error in the configuration. Unfortunately, I didn't capture the error, but it was something like "missing username" - which was puzzling. I tried a second time and the SAVE didn't complain again.

I presume I am going to have to wait a while to see if this error reoccurs as it is not clear to me how to cause the condition under which it occurred. I put a lot of faith into your expertise in this WAF stuff. It is very complex and would require me to forget about a lot of things I do understand in order to clear out enough neurons to absorb all the details of how WAF, and Admin Tools performs its important magic. If there is a way I COULD force the condition to occur that previously led to this error getting logged, I would very much like to know how to do that so I can confidently verify that all is working as it should - that is, cause the condition that previously led to the error being logged and then see that the error is not logged now that I have cleared the empty field found in "--- it was in the list of allowed IP addresses in under WAF -> Configure WAF -> Exceptions.

Given that this is a PHP error, I assume that you will be fixing the code so the existence of an empty field in this list will not cause a PHP error. Is that the case?  

Molte Grazie

tampe125
Akeeba Staff

This usually happens when you upgraded Admin Tools from a previous version. Did you made a clean install or you had a previous version installed?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

davidascher

it was an update/upgrade from a previous version. I have updated Admin Tools again and I see the error again in php_errorlog.There are no empty fields to be found in either the "allowed domains" or "never block these IP addresses" lists. The "warnings" occurred on Feb 17 - and I'm pretty certain that I cleared the empty field back on Feb 14 or 15 at the latest. 

Shouldn't this be something that gets fixed in the code??

thanks.

tampe125
Akeeba Staff

The problem is that the whole form and initial validation is performed by Joomla. Anyway, we created a workaround for that, can you please install the latest dev release and try again? https://www.akeeba.com/download/admin-tools-professional.html

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!