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

[4.x] Fix error from last upmerge from 3.10-dev causing issue 36730 #36733

Merged

Conversation

richard67
Copy link
Member

@richard67 richard67 commented Jan 18, 2022

Pull Request for Issue #36730 .

Summary of Changes

Fix the error not using the injected database object but an undefined $db variable coming from the upmerge of PR #34640 from 3.10-dev into 4.0-dev 10 days ago.

Thanks to @SniperSister for the hint.

Testing Instructions

Either just code review, or have a site updated from 4.0.5 to 4.0.6 where you can reproduce issue #36730 and check if this fix solves it.

Actual result BEFORE applying this Pull Request

Unhandled PHP error in file "plugins/system/redirect/redirect.php", line 243 causes a server error when having redirects.

Expected result AFTER applying this Pull Request

No unhandled PHP error in file "plugins/system/redirect/redirect.php", line 243 causes a server error when having redirects.

Documentation Changes Required

None.

@brianteeman
Copy link
Contributor

guess that @wilsonge might have one more release to do after all. ;)

@richard67
Copy link
Member Author

guess that @wilsonge might have one more release to do after all. ;)

Yes, it looks like something we should fix quickly, either with a quick release or with a known issue in documentation for 4.0.6.

@richard67
Copy link
Member Author

richard67 commented Jan 18, 2022

In fact it is a tricky error. When doing the upmerge and checking the differences, you don't really see that. You really have to know the complete file to see that there is no local $db variable anymore in that routine but an injected class variable to be used.

@SniperSister
Copy link
Contributor

Tested the patch, works fine!

@richard67
Copy link
Member Author

Tested the patch, works fine!

@SniperSister Could you mark that in the issue tracker?

@ipresencesa
Copy link

Version 4.0.7-dev #36733 is working like a charm.

Thank you

@richard67
Copy link
Member Author

Version 4.0.7-dev #36733 is working like a charm.

Thank you

@ipresencesa Please go to the issue tracker here https://issues.joomla.org/tracker/joomla-cms/36733 and use the "Test this" button to mark your test result. Thanks in advance.

@wilsonge wilsonge merged commit e35e37c into joomla:4.0-dev Jan 18, 2022
@richard67 richard67 deleted the 4.0-dev-fix-server-error-on-redirects branch January 18, 2022 15:42
@mahbr
Copy link

mahbr commented Jan 18, 2022

I have tested this item ✅ successfully on c01655e

Thanks very much for the rapid and working solution :-)


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

@richard67
Copy link
Member Author

Credits should go to @SniperSister because he pointed me to that thing I've missed when checking the call stack posted in the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants