Topic on Project:Support desk

Summary by Seb35

Fixed for the future 1.23.17. phabricator:T162572

Wgkderdicke (talkcontribs)

I just updated www.mobadaten.info from MW 1.23.15 to 1.23.16. After the update the white screen told me, that there is an unexpected "[" in file "title.php" on line 2283.

Line 2283 in "includes\title.php":

  • $errors[] = [ 'undelete-cantedit' ];

Line 2289 in "includes\title.php":

  • $errors[] = [ 'undelete-cantcreate' ];

As a quick and dirty solution I changed those lines to...

  • $errors[] = array( 'undelete-cantedit' );
  • $errors[] = array( 'undelete-cantcreate' );

...and the error vanished.

I do not know, if that is really an accurate solution, but since it seams to work...

Maybe someone could take a look. ...Or is this a subtle way to say, one should update from 1.23.x to the recent MW version?

And don't bother: I plan to change from 1.23.x to 1.27.x this summer.

Mainframe98 (talkcontribs)

That sounds like your PHP version is outdated. The issue has to do with the shorthand array syntax; that is it uses [] instead of array(), which is only supported with PHP 5.4. It is very likely that they did not account for that when they released that patch for 1.23. If you're upgrading to 1.27 this summer, you'll have to upgrade your PHP version too, so this error will not reoccur then. In short: This is an oversight by the developers.

Wgkderdicke (talkcontribs)

Well, the PHP version on the Mobadaten server is 5.3.29. That's is not the newest version. I am aware of the fact, that by upgrading to 1.27, PHP has to be upgraded first.

But the release notes file distributed with MW 1.23.16 states that PHP 5.3.2 or later is required. PHP 5.3.29 is later. If there is a security release for MW 1.23.16 released today, this security release had to be compatible with the system requirements of the 1.23 version. This includes compatibility to PHP 5.3.2.

This, that and the other (talkcontribs)

Looks like someone forgot about this when preparing the 1.23 update.

There's also an instance of [] on line 146 of includes/api/ApiMain.php that you need to change to array().

This will be fixed in 1.23.17, which I imagine will come out shortly. I filed phab:T162572 to track this.