+ if ( $title instanceof Title ) {
+ // Make sure JobQueue classes can pull the title from parameters alone
+ if ( $title->getDBkey() !== '' ) {
+ $params += [
+ 'namespace' => $title->getNamespace(),
+ 'title' => $title->getDBkey()
+ ];
+ }
+ } else {
+ $title = Title::makeTitle( NS_SPECIAL, '' );
+ }