Merge "Type hint against LinkTarget in WatchedItemStore"
[lhc/web/wiklou.git] / includes / logging / BlockLogFormatter.php
index ddecf9e..ead290f 100644 (file)
@@ -127,7 +127,7 @@ class BlockLogFormatter extends LogFormatter {
        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 [];