From: Aaron Schulz Date: Mon, 6 Jun 2016 06:04:20 +0000 (-0700) Subject: Avoid exceptions for empty titles in addResultToCache() for sanity X-Git-Tag: 1.31.0-rc.0~6707^2 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=9b3f2165a16505870d86b51aaa467fcd3643b12f;p=lhc%2Fweb%2Fwiklou.git Avoid exceptions for empty titles in addResultToCache() for sanity Bug: T137083 Change-Id: Ie8aabba30bc0d7a6910a58104ff08ea036ba962d --- diff --git a/includes/cache/LinkBatch.php b/includes/cache/LinkBatch.php index f48e0a5167..ec37dd61c3 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] = [];