Page MenuHomePhabricator

Creating new page with ShortUrl enabled results in array to string conversion
Closed, InvalidPublic

Description

Notice: Array to string conversion in /var/www/wiki/mediawiki/extensions/ShortUrl/ShortUrl.utils.php on line 81
Call Stack
#	Time	Memory	Function	Location
1	0.0001	362280	{main}( )	.../index.php:0
2	0.1515	3268560	MediaWiki->run( )	.../index.php:43
3	0.1521	3268816	MediaWiki->main( )	.../MediaWiki.php:522
4	0.3485	4873968	MediaWiki->{closure:/var/www/wiki/mediawiki/core/includes/MediaWiki.php:866-872}( )	.../MediaWiki.php:880
5	0.3485	4873968	OutputPage->output( )	.../MediaWiki.php:868
6	0.3584	4922088	SkinTemplate->outputPage( )	.../OutputPage.php:2345
7	0.7238	5775472	VectorTemplate->execute( )	.../SkinTemplate.php:252
8	1.0467	5851136	VectorTemplate->renderPortals( )	.../VectorTemplate.php:195
9	1.0628	5855296	VectorTemplate->renderPortal( )	.../VectorTemplate.php:273
10	1.0771	5856696	Hooks::run( )	.../VectorTemplate.php:319
11	1.0771	5857472	ShortUrlHooks::addToolboxLink( )	.../Hooks.php:195
12	1.0779	5857552	ShortUrlUtils::encodeTitle( )	.../ShortUrl.hooks.php:48
13	1.0785	5858176	base_convert ( )	.../ShortUrl.utils.php:81

Event Timeline

Code as of Nov 2016: https://github.com/wikimedia/mediawiki-extensions-ShortUrl/blob/3c6015c5ffb461234f2e801f369980fd896ed28c/ShortUrl.utils.php#L81.

Not sure how it can be an array, short of Memcached being poisoned by another code path, or one of Database::selectField or Database::insertId returning an array.

Not seen in WMF Logstash for at least 30 days. Shall we close this?

Looks like that was on my dev wiki, but obviously quite a while ago. Let me test it on my dev wiki tonight and see if I can still reproduce it anywhere

Thought: It wouldn't surprise me if it's related to the memcached interface changes in PHP7 (ala T196125: php-memcached 3.0 (PHP 7) incompatible with BagOStuff)