Page MenuHomePhabricator

Link trail uses PHP 5.1 only feature
Closed, ResolvedPublic


Author: webboy

The current $linkTrail in MessagesEn.php is:

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

According to \p is only available since PHP 5.1.0, but according to MediaWiki requires only PHP 5.0.

Version: 1.14.x
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:18 PM
bzimport set Reference to bz15035.

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

Release issue, assigned to Tim.

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.

Fixed in r38751, will be backported to 1.13.0rc2.

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...)

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.