Merge "Add pluggable talk page poster and use it for mediawiki.feedback"
[lhc/web/wiklou.git] / maintenance / storage / fixBug20757.php
index dd86619..d2fe3b4 100644 (file)
@@ -296,14 +296,15 @@ class FixBug20757 extends Maintenance {
                        $this->mapCache[$pageId] = $map;
                        $this->mapCacheSize += count( $map );
                }
+
                return $this->mapCache[$pageId];
        }
 
        /**
         * This is based on part of HistoryBlobStub::getText().
         * Determine if the text can be retrieved from the row in the normal way.
-        * @param $stub
-        * @param $secondaryRow
+        * @param array $stub
+        * @param stdClass $secondaryRow
         * @return bool
         */
        function isUnbrokenStub( $stub, $secondaryRow ) {
@@ -311,7 +312,10 @@ class FixBug20757 extends Maintenance {
                $text = $secondaryRow->old_text;
                if ( in_array( 'external', $flags ) ) {
                        $url = $text;
-                       @list( /* $proto */ , $path ) = explode( '://', $url, 2 );
+                       wfSuppressWarnings();
+                       list( /* $proto */, $path ) = explode( '://', $url, 2 );
+                       wfRestoreWarnings();
+
                        if ( $path == "" ) {
                                return false;
                        }
@@ -338,6 +342,7 @@ class FixBug20757 extends Maintenance {
 
                $obj->uncompress();
                $text = $obj->getItem( $stub['hash'] );
+
                return $text !== false;
        }
 }