summaryrefslogtreecommitdiff
path: root/includes/SpecialMIMEsearch.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
commita58285fd06c8113c45377c655dd43cef6337e815 (patch)
treedfe31d3d12652352fe44890b4811eda0728faefb /includes/SpecialMIMEsearch.php
parent20194986f6638233732ba1fc3e838f117d3cc9ea (diff)
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'includes/SpecialMIMEsearch.php')
-rw-r--r--includes/SpecialMIMEsearch.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/SpecialMIMEsearch.php b/includes/SpecialMIMEsearch.php
index cbbe6f93..8678118f 100644
--- a/includes/SpecialMIMEsearch.php
+++ b/includes/SpecialMIMEsearch.php
@@ -126,9 +126,12 @@ function wfSpecialMIMEsearch( $par = null ) {
}
function wfSpecialMIMEsearchParse( $str ) {
- wfSuppressWarnings();
+ // searched for an invalid MIME type.
+ if( strpos( $str, '/' ) === false) {
+ return array ('', '');
+ }
+
list( $major, $minor ) = explode( '/', $str, 2 );
- wfRestoreWarnings();
return array(
ltrim( $major, ' ' ),