From: Dereckson Date: Tue, 18 Dec 2012 00:31:03 +0000 (+0100) Subject: (bug 43218) Fixing PHP notice: undefined SERVER_PROTOCOL key X-Git-Tag: 1.31.0-rc.0~21267^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=7276fd4d90c72f666771dd81f0418513c4a703ce;p=lhc%2Fweb%2Fwiklou.git (bug 43218) Fixing PHP notice: undefined SERVER_PROTOCOL key Change-Id: I1ce7605a7c8503aed37ed9b3e7c3f3c13083db6f --- diff --git a/includes/OutputHandler.php b/includes/OutputHandler.php index 78435e415b..abf091e296 100644 --- a/includes/OutputHandler.php +++ b/includes/OutputHandler.php @@ -156,7 +156,7 @@ function wfMangleFlashPolicy( $s ) { * @param $length int */ function wfDoContentLength( $length ) { - if ( !headers_sent() && $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0' ) { + if ( !headers_sent() && isset( $_SERVER['SERVER_PROTOCOL'] ) && $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0' ) { header( "Content-Length: $length" ); } }