summaryrefslogtreecommitdiff
path: root/includes/SpecialMIMEsearch.php
diff options
context:
space:
mode:
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, ' ' ),