X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcache%2FLinkBatch.php;h=e6d8630c53cbfd763d7cc9f58116f98d80899470;hb=2e8d14593abba8658da342941a3bf282d1f4eb81;hp=f48e0a516796b36265b60fcef3687b3cd9dc0f3b;hpb=089612544da3abd89476f41476abc78b0cd98e98;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/LinkBatch.php b/includes/cache/LinkBatch.php index f48e0a5167..e6d8630c53 100644 --- a/includes/cache/LinkBatch.php +++ b/includes/cache/LinkBatch.php @@ -73,8 +73,8 @@ class LinkBatch { * @param string $dbkey */ public function add( $ns, $dbkey ) { - if ( $ns < 0 ) { - return; + if ( $ns < 0 || $dbkey === '' ) { + return; // T137083 } if ( !array_key_exists( $ns, $this->data ) ) { $this->data[$ns] = []; @@ -188,7 +188,7 @@ class LinkBatch { } // This is similar to LinkHolderArray::replaceInternal - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $table = 'page'; $fields = array_merge( LinkCache::getSelectFields(),