J3.x

Module random image PHP Error after 3.8.8

From Joomla! Documentation

Other languages:
Deutsch • ‎English • ‎Nederlands • ‎español • ‎français

Errors reported[edit]

Fatal error: Using $this when not in object context in .../modules/mod_random_image/tmpl/default.php on line 16

Versions affected[edit]

General Information

This pertains only to Joomla! version(s): 3.8.8

What is the cause[edit]

Modules don't have $this context, so can't call $this->escape(). Escape output using htmlspecialchars() instead.

How to fix[edit]

Apply this patch https://github.com/joomla/joomla-cms/pull/20533/files