Issue Bug Closed

#20225RemoveXSS is incompatible with PHP 5.2.9

Xavier Perseguers 03/21/09, 10:21 updated 10/02/18, 12:27

Description

RemoveXSS cannot be used with PHP 5.2.9 as it is defined as this:

class RemoveXSS {

function RemoveXSS($val) {
// code snipped
}

}

with the intent to use it like this:

$foo = RemoveXSS::RemoveXSS($some_input);

In PHP 5.2.9 this call issues a warning as a non-static method is used as a static method (I wonder if other /more-critical/ core will be affected too):

————-
Fatal error: Non-static method RemoveXSS::RemoveXSS() cannot be called statically, assuming $this from incompatible context
————-

Problem: it is not possible to make it static either:

————-
Fatal error: Constructor RemoveXSS::RemoveXSS() cannot be static
————-

Solution: make non-static method RemoveXSS a wrapper for static method process() – same name as in trunk – and mark the former as deprecated.
(issue imported from #M10759)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.