[TYPO3-core] RFC #10759: RemoveXSS is incompatible with PHP 5.2.9 in TYPO3 4.2

Martin Kutschker masi-no at spam-typo3.org
Sun Mar 29 18:39:22 CEST 2009


Steffen Kamper schrieb:
> Hi,
> 
> Xavier Perseguers schrieb:
>> Hi,
>>
>>>>> i think following:
>>>>> in php4 the pseudo constructor was function with same name as
>>>>> class, so if you instance it, it will call the function as well.
>>>>> This can be prevented by defining an empty __constructor() in this
>>>>> class.
>>>>
>>>> Perhaps but this patch is for 4.2 and 4.2 needs PHP5.2. Why would we
>>>> have to care of PHP4?
>>>>
>>>
>>> do you know that even php has the compatibility cow? :-)
>>>
>>> This simply means, instancing the class will use the function as
>>> constructor, even in php5.
>>>
>>> If you insert this line
>>> function __construct() {}
>>>
>>> it doesn't anymore, even with the same name of function, then also no
>>> wrapper is needed.
>>
>> I'm OK with any solution that fixes this bug. The idea was to provide
>> the same signature as in 4.3 with a compatibility fallback but the
>> signature changed anyway in 4.3 meaning this does not much sense.
>>
>> If you prefer or find that it's better defining __construct() then I
>> agree.
>>
> 
> i prefer doing both:
> * use empty __construct to prevent execute with instancing
> * use the wrapper (and the fix that 4.3 calls the right function)
> * mark function as deprecated so we can get rid of it in future

I have no problem with that, but I can do without the constructor.

Masi


More information about the TYPO3-team-core mailing list