Merge "filebackend: clean up some comments and remove unused FileBackendStoreOpHandle...
[lhc/web/wiklou.git] / includes / logging / BlockLogFormatter.php
index ddecf9e..d27643c 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 [];
@@ -262,6 +262,10 @@ class BlockLogFormatter extends LogFormatter {
                return $params;
        }
 
+       /**
+        * @inheritDoc
+        * @suppress PhanTypeInvalidDimOffset
+        */
        public function formatParametersForApi() {
                $ret = parent::formatParametersForApi();
                if ( isset( $ret['flags'] ) ) {