[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 17:13:15 CET 2010


Steffen Kamper schrieb am 17.02.2010 13:33:

>> "news" is supported as all other schemes (also "blalbalba://"). This is
>> how filter_var also works.

> but you only allow mailto, news and file (beside http(s))
> 
> if (!isset($parsed['host']) && !in_array($scheme, array('mailto',
> 'news', 'file'))) {
> 
> so why allowing news here?

If you watch closely, there is a logical "AND" in between. I (just like
the PHP filter_var) just check if "host" is present in all schemes
BESIDES mailto, news and file (which can also have valid URLs without a
host, as the comment in the PHP source code suggest).

So any other scheme will also be accepted, but will require a valid host.

I won't go into the merit of arguing if this makes sense or not: This is
just what PHP's filter_var does. If we strive to keep the current
functionality, I would suggest to leave it as it is (if someone doesn't
find an obvious bug in the patch of course).

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list