Error
MediaWiki version: 1.36.0-wmf.16
Argument 2 passed to GrowthExperiments\NewcomerTasks\TaskSuggester\CacheDecorator::suggest() must be of the type array, null given, called in /srv/mediawiki/php-1.36.0-wmf.16/extensions/GrowthExperiments/includes/NewcomerTasks/TaskSuggester/NewcomerTasksCacheRefreshJob.php on line 35
Impact
Low impact; jobs to proactively refresh the cache of newcomer tasks are failing. This means that 7 days after a visit to Special:Homepage, a page load will take several seconds instead of <1 second.
Notes
In CacheDecorator we create the job like this:
$this->jobQueueGroup->lazyPush( new NewcomerTasksCacheRefreshJob( [ 'userId' => $user->getId(), 'taskTypeFilters' => $taskSetFilters->getTaskTypeFilters(), 'topicFilters' => $taskSetFilters->getTopicFilters(), 'limit' => SearchTaskSuggester::DEFAULT_LIMIT, 'jobReleaseTimestamp' => (int)wfTimestamp() + // Process the job the day before the cache expires. ( $this->cache::TTL_WEEK - $this->cache::TTL_DAY ), ] ) );
TaskSetFilters is constructed with two arrays, and getTaskTypeFilters and getTopicFilters are both typed to return arrays. SearchTaskSuggester::DEFAULT_LIMIT is a constant that returns an integer value.
The erroring code in NewcomerTasksCacheRefreshJob is:
$taskSuggester->suggest( $user, $this->params['taskTypeFilters'], $this->params['topicFilters'], $this->params['limit'], null, false, false );
And from the stacktrace it looks like somehow taskTypeFilters, topicFilters, and limit are all null. I don't understand how this is possible, unless there is some mechanism that is erroring on the array / int values (but somehow not the user ID int value?).