Fix E_NOTICE on line 76 if $_SERVER['HTTP_ACCEPT'] not set
authorAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 26 Mar 2007 16:42:45 +0000 (16:42 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 26 Mar 2007 16:42:45 +0000 (16:42 +0000)
includes/Metadata.php

index 98a92ec..9964a3d 100644 (file)
@@ -73,6 +73,10 @@ function wfCreativeCommonsRdf($article) {
 function rdfSetup() {
        global $wgOut, $_SERVER;
 
+       if( !isset($_SERVER['HTTP_ACCEPT']) ) {
+               $_SERVER['HTTP_ACCEPT'] = '';
+       }
+
        $rdftype = wfNegotiateType(wfAcceptToPrefs($_SERVER['HTTP_ACCEPT']), wfAcceptToPrefs(RDF_TYPE_PREFS));
 
        if (!$rdftype) {