Fix #31197 for Joomla 2.5