Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


$app->registeredurlparams is not defined #3220

wants to merge 1 commit into from

4 participants


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 a replacement for #2706 with a better fix, since there was no response from @FriendlyHacker in 2 months. Thank you for your work.


I know it's not really your submission but is there any easy way of replicating this Hannes? (obviously from a code perspective it's correct - but just to do the official testing crap)


I can confirm this fixes the issue, and has not broken anything else so far.


This is how you replicate it:

1 - Enable warnings to be written to PHP error log.
2 - Visit your site a few times
3 - Open error log
4 - Find PHP Warning: Creating default object from empty value in libraries/joomla/cache/cache.php on line 702
5 - Apply fix
6 - Watch Joomla performance double

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.

@Bakual Bakual closed this in e36643c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 2, 2014
  1. @Hackwar
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  libraries/joomla/cache/cache.php
2  libraries/joomla/cache/cache.php
@@ -692,6 +692,8 @@ public static function makeId()
$app = JFactory::getApplication();
+ $registeredurlparams = new stdClass;
// Get url parameters set by plugins
if (!empty($app->registeredurlparams))
Something went wrong with that request. Please try again.