public function getPreloadTitles() {
$title = $this->entry->getTarget();
// Preload user page for non-autoblocks
- if ( substr( $title->getText(), 0, 1 ) !== '#' ) {
+ if ( substr( $title->getText(), 0, 1 ) !== '#' && $title->isValid() ) {
return [ $title->getTalkPage() ];
}
return [];
return $params;
}
+ /**
+ * @inheritDoc
+ * @suppress PhanTypeInvalidDimOffset
+ */
public function formatParametersForApi() {
$ret = parent::formatParametersForApi();
if ( isset( $ret['flags'] ) ) {