[TYPO3-core] RFC #13258: Bugfix: TYPO3 4.2 should work on PHP 5.1 again

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Feb 17 10:27:36 CET 2010


Martin Kutschker schrieb am 17.02.2010 09:26:
> Dmitry Dulepov schrieb:
>> Hi!
>>
>> On 2010-02-16 14:10:25 +0200, Martin Kutschker said:
>>> As Ernesto said, please reread the code. While there is special
>>> handling for the schemes http, https
>>> and mailto any scheme is valid. After all schemes can be invented any
>>> day.
>> By the way, we could also have a functions_exists() check there to use
>> filter_var when available.
> 
> Good idea. Would make also the awkward comment obsolete.

Good idea too. Here is a new patch which implements the same
functionality as the original filter_var from PHP and only if
"filter_var" does not exist.

Attached are also additional unit tests (for trunk only) which come
straight from the test cases included with the PHP source code
(ext/filter/tests/015.phpt) and which validate the filter_var
FILTER_VALIDATE_URL in PHP. I used those tests to make sure our function
works like the original one.

But still the "fix" only needs to be applied to branch v4.2, as we have
PHP 5.2 requirement in v4.3 anyway. I'll only commit the unit tests to
trunk to have it "documented".

Cheers,
Ernesto

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 13258-v3.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100217/03008c6a/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 13258-unittests-trunk.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100217/03008c6a/attachment.txt>


More information about the TYPO3-team-core mailing list