On a Semantic Mediawiki enhanced wiki (SMW 2.5.6) every page gets an error like below, after upgrading to MW 1.31.0 from 1.27.4
TypeError from line 47 of /www/WIKIFARM131/includes/jobqueue/jobs/RefreshLinksJob.php:
Argument 2 passed to RefreshLinksJob::__construct() must be of the type array, string given,
called in /www/WIKIFARM131/includes/jobqueue/Job.php on line 83
Backtrace:
#0 /www/WIKIFARM131/includes/jobqueue/Job.php(83): RefreshLinksJob->__construct(Title, string)
#1 /www/WIKIFARM131/includes/jobqueue/JobQueueDB.php(303): Job::factory(string, Title, string, string)
#2 /www/WIKIFARM131/includes/jobqueue/JobQueue.php(372): JobQueueDB->doPop()
#3 /www/WIKIFARM131/includes/jobqueue/JobQueueGroup.php(263): JobQueue->pop()
#4 /www/WIKIFARM131/includes/jobqueue/JobRunner.php(167): JobQueueGroup->pop(integer, integer, array)
#5 /www/WIKIFARM131/includes/MediaWiki.php(1002): JobRunner->run(array)
#6 /www/WIKIFARM131/includes/MediaWiki.php(988): MediaWiki->triggerSyncJobs(integer, MediaWiki\Logger\LegacyLogger)
#7 /www/WIKIFARM131/includes/MediaWiki.php(912): MediaWiki->triggerJobs()
#8 /www/WIKIFARM131/includes/MediaWiki.php(727): MediaWiki->restInPeace(string, boolean)
#9 /www/WIKIFARM131/includes/MediaWiki.php(750): MediaWiki->{closure}()
#10 /www/WIKIFARM131/includes/MediaWiki.php(557): MediaWiki->doPostOutputShutdown(string)
#11 /www/WIKIFARM131/index.php(42): MediaWiki->run()
#12 {main}The offending line at RefreshLinksJob.php(47)
function __construct( Title $title, array $params ) {declares $params as array type.
In the call Job.php(83):
$job = new $handler( $title, $params );
variable $params was declared:
public static function factory( $command, Title $title, $params = [] ) {
Somehow $params is unexpectedly called with a string value, the result of:
$job = Job::factory( $row->job_cmd, $title, self::extractBlob( $row->job_params ), $row->job_id );
I got rid of the error message by changing Job.php(83) to:
$job = new $handler( $title, array( $params ) );
I guess the problem is not solved this way...