X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fstorage%2FfixBug20757.php;h=d2fe3b42b84a33427946eb978600fd3e1e3a258e;hb=b2f4fd38db7868e7088bc9b59a78a53e445265c7;hp=dd86619e7599ef9f25aed00805a085b7bc993b24;hpb=9c4f40123d53a3b561757fd57ccd04b9c391805a;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/storage/fixBug20757.php b/maintenance/storage/fixBug20757.php index dd86619e75..d2fe3b42b8 100644 --- a/maintenance/storage/fixBug20757.php +++ b/maintenance/storage/fixBug20757.php @@ -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; } }