Page MenuHomePhabricator

Warning: simplexml_load_file() expects at most 2 parameters, 3 given in \includes\SpecialVersion.php on line 285
Closed, ResolvedPublic

Description

Author: dimitar.tsonev

Description:
After a clean installation of mw 1.10-svn, the following warning appears on
Special:Version page:

Special:Version Warning: simplexml_load_file() expects at most 2 parameters, 3
given in \includes\SpecialVersion.php on line 28

  • MediaWiki: 1.10alpha
  • PHP: 5.0.4 (apache2handler)
  • MySQL: 4.1.12
  • OS: Windows XP (XAMPP)

Version: 1.10.x
Severity: normal
OS: Windows XP
Platform: PC

Details

Reference
bz9682

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:38 PM
bzimport set Reference to bz9682.
bzimport added a subscriber: Unknown Object (MLST).

simplexml_load_file accept an optional third operator since 5.1.x .
Since this is a rare occurrence (user running mediawiki from svn
with php 5.0.x), I am marking it as WONTFIX.

To solve the problem, upgrade to a 5.1.x php.

ayg wrote:

I thought we were currently avoiding 5.1 dependencies in core code.

Restored to original version in r21629; unclear why Nick added the 5.1 dependency.

nickpj wrote:

The answer is simply that I was not aware that I had added the 5.1 dependency.
My apologies, and thank you for reverting.

I would personally quite like 5.1.0 as the baseline because of entirely separate
reasons (5.0 has some corruption bugs, is unmaintained, has restrictions on the
usefulness of type hinting, etc), but I feel even more strongly that any such
change should be agreed upon, intentional, explicit, announced clearly, and not
affect 1.10 (given the proximity to release).