? ? ? Pending

User tests: Successful: Unsuccessful:

avatar tampe125
tampe125
29 Jul 2022

Summary of Changes

This PR aims to fix some PHP notices when running under CLI. In that case, if a form is loaded (for example to gather the default data), the onContentPrepareForm event is fired. The WebAuthn plugin kicks in, tries to read the current URL and a notice is raised.
This PR will double check that we are in a web environment before continuing the execution

Testing Instructions

The best way to test it is to have a small script that tries to load an XML form. Sadly at the moment I don't have any, I came across this bug by developing CLI commands for the next version of Admin Tools.

Actual result BEFORE applying this Pull Request

PHP notice:

Notice: Undefined index: HTTP_HOST in /var/www/html/temp/libraries/src/Uri/Uri.php on line 103

Expected result AFTER applying this Pull Request

No PHP notice

Documentation Changes Required

None

avatar tampe125 tampe125 - open - 29 Jul 2022
avatar tampe125 tampe125 - change - 29 Jul 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 29 Jul 2022
Category Front End Plugins
avatar nikosdion nikosdion - change - 29 Jul 2022
Labels Added: ?
avatar alikon
alikon - comment - 29 Jul 2022

I have tested this item successfully on 25c73da


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38340.

avatar alikon alikon - test_item - 29 Jul 2022 - Tested successfully
avatar RickR2H
RickR2H - comment - 23 Aug 2022

I have tested this item successfully on 25c73da

Tested by code review


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38340.

avatar RickR2H RickR2H - change - 23 Aug 2022
Status Pending Ready to Commit
avatar RickR2H
RickR2H - comment - 23 Aug 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38340.

avatar RickR2H RickR2H - test_item - 23 Aug 2022 - Tested successfully
avatar laoneo
laoneo - comment - 3 Sep 2022

Is this one still valid with #38524 being merged?

avatar wilsonge
wilsonge - comment - 5 Sep 2022

It will be in old style CLI apps. Plus it's better that this doesn't apply in API Apps anyhow - which even though it doesn't error - currently web auth will still run without this patch

avatar wilsonge wilsonge - change - 5 Sep 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-09-05 11:17:30
Closed_By wilsonge
Labels Added: ? ?
avatar wilsonge wilsonge - close - 5 Sep 2022
avatar wilsonge wilsonge - merge - 5 Sep 2022

Add a Comment

Login with GitHub to post a comment