User tests: Successful: Unsuccessful:
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
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.
PHP notice:
Notice: Undefined index: HTTP_HOST in /var/www/html/temp/libraries/src/Uri/Uri.php on line 103
No PHP notice
None
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Labels |
Added:
?
|
I have tested this item
Tested by code review
Status | Pending | ⇒ | Ready to Commit |
RTC
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
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:
?
?
|
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.