joomla/joomla-cms — pull request #4421 by haydenyoung (2014-10-01 22:38:34+00:00)
Title: Fix renderModules error when getTemplate called with true from included module templates

When getTemplate(true) is called from a module override (i.e. to retrieve template params), JModuleHelper renderModules method breaks because the $template variable's value has changed from a string (the name of the template) to an object (holding the template's params) between being assigned and when actually called. This is due to module overrides being called after the variable has been assigned a value but before it is used by the chrome and attribs vars.

Instead of assigning to a $template var, getTemplate is called directly to ensure the template name is available rather than the stdClass.