Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Catch undefined cors options when saving global options #45103

Open
wants to merge 3 commits into
base: 5.3-dev
Choose a base branch
from

Conversation

laoneo
Copy link
Member

@laoneo laoneo commented Mar 10, 2025

Summary of Changes

When saving an option on cli, then are undefined property warnings thrown on error reporting maximum.

Testing Instructions

Execut cli/joomla.php config:set debug=1 on the console within the joomla root folder.

Actual result BEFORE applying this Pull Request

The following four warnings are displayed:

Warning: Undefined array key "cors" in /var/www/html/Projects/cms5/administrator/components/com_config/src/Model/ApplicationModel.php on line 748

Warning: Undefined array key "cors_allow_origin" in /var/www/html/Projects/cms5/administrator/components/com_config/src/Model/ApplicationModel.php on line 749

Warning: Undefined array key "cors_allow_headers" in /var/www/html/Projects/cms5/administrator/components/com_config/src/Model/ApplicationModel.php on line 750

Warning: Undefined array key "cors_allow_methods" in /var/www/html/Projects/cms5/administrator/components/com_config/src/Model/ApplicationModel.php on line 751

Expected result AFTER applying this Pull Request

No warnings.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@muhme
Copy link
Contributor

muhme commented Mar 11, 2025

I have tested this item ✅ successfully on edf6bc8

Before applying this PR and if the four cors*-entries are deleted from configuration.php file, the four deprecation warnings are shown. After applying this PR no deprecation warnings are shown anymore and enabling/disabling Debug System continues to work with Joomla Command Line Interface.


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

@alikon
Copy link
Contributor

alikon commented Mar 11, 2025

I have tested this item ✅ successfully on edf6bc8


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

@alikon
Copy link
Contributor

alikon commented Mar 11, 2025

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-5.3-dev RTC This Pull Request is Ready To Commit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants