From: Aryeh Gregor Date: Mon, 26 Mar 2007 16:42:45 +0000 (+0000) Subject: Fix E_NOTICE on line 76 if $_SERVER['HTTP_ACCEPT'] not set X-Git-Tag: 1.31.0-rc.0~53601 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=054e36df6877ca4e326fdd941e9d48df8f5eef10;p=lhc%2Fweb%2Fwiklou.git Fix E_NOTICE on line 76 if $_SERVER['HTTP_ACCEPT'] not set --- diff --git a/includes/Metadata.php b/includes/Metadata.php index 98a92ecd30..9964a3d3aa 100644 --- a/includes/Metadata.php +++ b/includes/Metadata.php @@ -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) {