J3.x

J3.x:Fatal Error in Input Filtering

From Joomla! Documentation

Other languages:
English • ‎Nederlands • ‎español • ‎français • ‎italiano
Joomla! 
3.5.1

Some 3rd party extensions started giving fatal errors when doing data sanitisation in Joomla 3.5 and higher

Errors reported

Fatal error: Using $this when not in object context in libraries/joomla/filter/input.php on line 233

Versions affected

General Information

This pertains only to Joomla! version(s): 3.5.0 and higher

What is the cause

This is an issue in 3rd party extensions in Joomla 3.5 and higher where extensions that were incorrectly (since Joomla 1.6) calling Joomla's filtering API started to give fatal errors because of the additional check for whether to strip emoticons based on database support.

How to fix

Ensure your extensions are running the latest versions.

You can also search for uses of

JFilterInput::clean(SOMETEXT);

and replace it with:

$filter = new JFilterInput;
$filter->clean(SOMETEXT);