Page MenuHomePhabricator

MediaWiki master fatals: "Cannot use string offset as an array in ExtensionProcessor"
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

  • Have some skins loaded (assumingly, error message is not very precise)

What happens?:

Warning: Illegal string offset 'args' in /srv/mediawiki/1.41/includes/registration/ExtensionProcessor.php on line 709
Fatal error: Uncaught Error: Cannot use string offset as an array in /srv/mediawiki/1.41/includes/registration/ExtensionProcessor.php:709
Stack trace:
#0 /srv/mediawiki/1.41/includes/registration/ExtensionProcessor.php(263): ExtensionProcessor->extractSkins('/srv/mediawiki/...', Array)
#1 /srv/mediawiki/1.41/includes/registration/ExtensionRegistry.php(434): ExtensionProcessor->extractInfo('/srv/mediawiki/...', Array, 1)
#2 /srv/mediawiki/1.41/includes/registration/ExtensionRegistry.php(289): ExtensionRegistry->readFromQueue(Array)
#3 /srv/mediawiki/1.41/includes/Setup.php(283): ExtensionRegistry->loadFromQueue()
#4 /srv/mediawiki/1.41/maintenance/run.php(49): require_once('/srv/mediawiki/...')
#5 {main}
  thrown in /srv/mediawiki/1.41/includes/registration/ExtensionProcessor.php on
line 709

This is given on every page.

Likely caused by 3b7ca22

What should have happened instead?:
It should be able to handle of args are not set at all, I assume, or the error message should be more precise to know what skin is causing the issue. For the record, this doesn't just effect skins formerly giving the deprecation warning "Template directory should be relative to skin or omitted for skin X", as I had removed all those, so it seems more like an issue that would effect other skins as well then a simple skin who hasn't fixed that yet.

Software version: 1.41.0-alpha (bcaab3d)

I know that this isn't meant to be stable, so of course there will be issues, but I have MediaWiki master in a development environment so I figured I would just report this here.

Event Timeline

taavi subscribed.

Unable to reproduce with:

wfLoadSkin( 'Vector' );
wfLoadSkins( [ 'MonoBook' ] );

So this seems like an issue coming from an individual skins ValidSkinNames skin.json option and not a more general issue that affects all the skins. I suggest doing some sort of a binary search to find the skin that's causing the issues.

Likely caused by 3b7ca22

Did you bisect this or is this an educated guess?

Have some skins loaded

Please give precise skin name.

Have some skins loaded

Please give precise skin name.

All the bundled skins, I will determine exact cause later by disabling one-by-one.

Unable to reproduce with:

wfLoadSkin( 'Vector' );
wfLoadSkins( [ 'MonoBook' ] );

So this seems like an issue coming from an individual skins ValidSkinNames skin.json option and not a more general issue that affects all the skins. I suggest doing some sort of a binary search to find the skin that's causing the issues.

Likely caused by 3b7ca22

Did you bisect this or is this an educated guess?

An educated guess, as it is the only commit to touch this line, and before would have certainly handled it.

This is an issue with a broken skin, which the bug author needs to identify.

Apologies, I thought I had all other skins disabled, it seems I still had a bunch enabled. I found the issue with two skins (at least two I have installed): Metrolook, and Tweeki.

Again sorry for the vague report, and for not checking ahead of time, I should have confirmed this before...

This has actually stopped me from being able to update my local MediaWiki installation as Installer extract skins caused an fatal error.