$app->registeredurlparams is not defined #3220
Moving the rest of the function inside the if loop makes sure $app->registeredurlparams is only referred to if actually exists.
This was causing memory leak on 3.2.1 Joomla install over PHP 5.5, performance has increased after the fix.
This is how you replicate it:
1 - Enable warnings to be written to PHP error log.
For extra effect, clear your error log file. This warning message gets written every time someone visits and you might have a huge log file consuming all your server's RAM because of it.