Project

General

Profile

Actions

Bug #20225

closed

RemoveXSS is incompatible with PHP 5.2.9

Added by Xavier Perseguers over 15 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-03-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

removexss.diff (1.04 KB) removexss.diff Administrator Admin, 2009-03-21 10:21

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #19699: Non-static method RemoveXSS::RemoveXSS() cannot be called staticallyClosedOliver Hader2008-12-15

Actions
Actions

Also available in: Atom PDF