From c6801f4b08d44836cfdf4c149ca0250ba08bd4be Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Thu, 22 Nov 2012 04:39:54 +0400 Subject: [PATCH] (bug 38897) Fix unhandled exception when visiting e.g. MediaWiki:Somemessage/0 Change-Id: I9876e4fb21c2a1a3a0a14bff05633c7aef6a3fd3 --- includes/LocalisationCache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/LocalisationCache.php b/includes/LocalisationCache.php index 94e823e16b..f6f5a76fe7 100644 --- a/includes/LocalisationCache.php +++ b/includes/LocalisationCache.php @@ -1160,7 +1160,7 @@ class LCStore_CDB implements LCStore { } protected function getFileName( $code ) { - if ( !$code || strpos( $code, '/' ) !== false ) { + if ( strval( $code ) === '' || strpos( $code, '/' ) !== false ) { throw new MWException( __METHOD__ . ": Invalid language \"$code\"" ); } return "{$this->directory}/l10n_cache-$code.cdb"; -- 2.20.1