Link trail uses PHP 5.1 only feature
Closed, ResolvedPublic

Description

Author: webboy

Description:
The current $linkTrail in MessagesEn.php is:

$linkTrail = '/^(\p{L&}+)(.*)$/usD';

According to http://nl.php.net/manual/en/regexp.reference.php#regexp.reference.unicode \p is only available since PHP 5.1.0, but according to http://www.mediawiki.org/wiki/Installation MediaWiki requires only PHP 5.0.


Version: 1.14.x
Severity: enhancement
URL: http://nl.php.net/manual/en/regexp.reference.php#regexp.reference.unicode

bzimport set Reference to bz15035.
bzimport created this task.Via LegacyAug 4 2008, 2:16 PM
Catrope added a comment.Via ConduitAug 4 2008, 2:17 PM

I suggest we just up the requirements and require 5.1 then. Some 5.0 versions are broken anyway.

brion added a comment.Via ConduitAug 4 2008, 8:48 PM

Release issue, assigned to Tim.

bzimport added a comment.Via ConduitAug 4 2008, 8:51 PM

ayg wrote:

As I've mentioned to Tim, this is also not available in the default RHEL PHP 5.1. My PHP error log is full of this:

[04-Aug-2008 15:47:47] 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 /var/www/w/includes/Linker.php on line 1364

And I can't find a package to install that will add support for it, either.

tstarling added a comment.Via ConduitAug 8 2008, 3:55 AM

Fixed in r38751, will be backported to 1.13.0rc2.

brion added a comment.Via ConduitAug 11 2008, 1:03 AM

The fix was a revert to the ancient lowercase-ASCII-a-z-only linktrail, and caused regressions for all the languages whose custom linktrails were removed due to the default one finally being reasonably inclusive.

(Polish at least recently reinstated a specific one.)

I'd recommend at least extending the default to cover all Latin letters. (IMHO inconsistency of the linktrail among languages is another of those evil things that makes parsing harder...)

tstarling added a comment.Via ConduitAug 11 2008, 4:29 AM

Checked all references to linkTrail in the log for possible removals, backported r39116 (pl linkTrail restore) to REL1_13. A linkTrail covering all latin letters would be good for 1.14, but I don't think it's worthwhile making such a change in 1.13.

Add Comment