From: Chad Horohoe Date: Sat, 25 Jul 2009 00:27:56 +0000 (+0000) Subject: Make $headers protected and declare it as an empty array. X-Git-Tag: 1.31.0-rc.0~40727 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=9216c191fe8d129156c36d2ac8522c7747120f20;p=lhc%2Fweb%2Fwiklou.git Make $headers protected and declare it as an empty array. --- diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 3ae1a20824..784dc0fab1 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -43,8 +43,7 @@ if ( !function_exists( '__autoload' ) ) { * @ingroup HTTP */ class WebRequest { - protected $data = array(); - var $headers; + protected $data, $headers = array(); private $_response, $mFixMagicQuotes; public function __construct() { @@ -632,8 +631,7 @@ class WebRequest { public function getHeader( $name ) { $name = strtoupper( $name ); if ( function_exists( 'apache_request_headers' ) ) { - if ( !isset( $this->headers ) ) { - $this->headers = array(); + if ( !$this->headers ) { foreach ( apache_request_headers() as $tempName => $tempValue ) { $this->headers[ strtoupper( $tempName ) ] = $tempValue; } @@ -681,7 +679,7 @@ class WebRequest { */ class FauxRequest extends WebRequest { private $wasPosted = false; - private $session, $headers = array(); + private $session = array(); /** * @param $data Array of *non*-urlencoded key => value pairs, the