From: Max Semenik Date: Thu, 22 Nov 2012 00:39:54 +0000 (+0400) Subject: (bug 38897) Fix unhandled exception when visiting e.g. MediaWiki:Somemessage/0 X-Git-Tag: 1.31.0-rc.0~21378^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=c6801f4b08d44836cfdf4c149ca0250ba08bd4be;p=lhc%2Fweb%2Fwiklou.git (bug 38897) Fix unhandled exception when visiting e.g. MediaWiki:Somemessage/0 Change-Id: I9876e4fb21c2a1a3a0a14bff05633c7aef6a3fd3 --- 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";