? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
2 Nov 2018

Pull Request for pr comment ##22913 (comment).

Summary of Changes

In the abstract event when the argument has the same name as the getter/setter function, then an infinite loop happens. This is a workaround to directly fetch the Arguments in the getter, instead of calling the helper function of the abstract base class.

The problem is this line https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Event/AbstractEvent.php#L138, which produces an infinite loop. Honestly I would remove the getArgument/setArgument overriden functions completely. @mbabker thoughts?

Testing Instructions

  • Apply patch #22913
  • Activate the redirect plugin
  • On the front open a none existent url

Expected result

Error page with 404 is shown.

Actual result

Site crashes with an infinite loop.

avatar laoneo laoneo - open - 2 Nov 2018
avatar laoneo laoneo - change - 2 Nov 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2018
Category Libraries
avatar infograf768
infograf768 - comment - 4 Nov 2018

I now get

Notice: Undefined variable: params in /Applications/MAMP/htdocs/installmulti/joomla40/plugins/system/redirect/redirect.php on line 254

[04-Nov-2018 06:20:00 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Symfony\Component\Debug\ExceptionHandler::handle() must be an instance of Exception, instance of Error given in /Applications/MAMP/htdocs/installmulti/joomla40/libraries/vendor/symfony/debug/ExceptionHandler.php:106
Stack trace:
#0 [internal function]: Symfony\Component\Debug\ExceptionHandler->handle(Object(Error))
#1 {main}
  thrown in /Applications/MAMP/htdocs/installmulti/joomla40/libraries/vendor/symfony/debug/ExceptionHandler.php on line 106

If I also apply #22917 then these errors are gone.
==> I suggest to combine these PRs to simplify testing.
(We still get all modules in the 404 but that is another issue.)

avatar infograf768 infograf768 - test_item - 4 Nov 2018 - Tested successfully
avatar laoneo
laoneo - comment - 4 Nov 2018

Merged #22917.

avatar infograf768
infograf768 - comment - 4 Nov 2018

I have tested this item successfully on c32ea23


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

avatar wilsonge wilsonge - change - 6 Nov 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-11-06 09:00:16
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 6 Nov 2018
avatar wilsonge wilsonge - merge - 6 Nov 2018
avatar wilsonge
wilsonge - comment - 6 Nov 2018

Looks correct to me

Add a Comment

Login with GitHub to post a comment