Mediawiki: Problem with Extension MultiUpload / TagCloud

We had an error while using the MultiUpload-Extension along with WikiCategoryTagCloud. After every successful upload we got this for every uploaded file:

Warning: Illegal offset type in isset or empty in (...)/includes/Title.php on line 117
Warning: trim() expects parameter 1 to be string, array given in (...)/includes/Title.php on line 2286

We found out, that there is a minor bug in the code of function “invalidateCache” of WikiCategoryTagCloud. In the line

$titles[0] = explode( "\n", wfMsg( 'tagcloudpages' ) );

the whole “exploded” tagcloudpages go as a second array into the first slot of $titles[0]. So that later on in the code there is no single string to be handed, but a whole array (“expects parameter 1 to be string, array given”). To correct the error we changed the above line to this:

$titles = explode( "\n", wfMsg( 'tagcloudpages' ) );

This way all lines (page_titles) from the article Mediawiki:Tagcloudpages implicitly build up an array in the variable $titles and can be referenced correctly later on in the function’s code.

System: MediaWiki 1.16.5, PHP 5.3.3, MySQL 5.0.77

This post is a copy of my two cents I put in at


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: