Bug #20225
closedRemoveXSS is incompatible with PHP 5.2.9
0%
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)
Files