[TYPO3-core] RFC: Bug #15311: t3lib_div::sanitizeLocalUrl() leads to fatal error on PHP4 systems

Oliver Hader oliver at typo3.org
Mon Aug 2 16:35:27 CEST 2010


This is an SVN patch request.

Type: Bugfix

Bugtracker references:
http://bugs.typo3.org/view.php?id=15311

Branches: TYPO3_4-1

Problem:
(from the report)
After updating my TYPO3 Installations from 4.1.13 to 4.1.14 I was hit by
the bug 0015263

So I applied the patch 0015263_v2.patch. After this I still can't clear
the cache (white Menu Frame)
and I get this PHP Error:

[Fri Jul 30 17:55:06 2010] [error] [client xxx.xxx.xx.xx] PHP Warning:
preg_match() [<a href='function.preg-match'>function.preg-match</a>]:
Compilation failed: support for \\P, \\p, and \\X has not been compiled
at offset 3 in /usr/lib/typo3/typo3_src-4.1.14/t3lib/class.t3lib_div.php
on line 3612, referer: http://www.domain.tld/typo3/alt_menu.php. [^]

Solution:
Remove the unicode character classes in the regular expression and
replace them by regular plain classes. Besides that, the host name will
not be checked with the pattern but will be compared to the current host
name later - so, that's fine.

The only drawback is, that subdirectories having a TYPO3 installation
with umlauts must be changed. However, that's easier than changing a
domain name...

Example:
http://myhost.de/müller/typo3/ -> http://myhost.de/mueller/typo3/

Notes:
See the PHP information on unicode support in regular expressions:
http://www.php.net/manual/en/regexp.reference.unicode.php

olly
-- 
Oliver Hader
TYPO3 v4 Core Team Leader
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0015311_v2.patch
Type: text/x-patch
Size: 1223 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100802/3ed1e87c/attachment.bin>


More information about the TYPO3-team-core mailing list