Removed static body variable from Request

pull/151/head
Daniel Stelljes 10 years ago
parent 703536d2bf
commit 54440d1db0

@ -120,11 +120,6 @@ class Request {
*/ */
public $proxy_ip; public $proxy_ip;
/**
* @var mixed Data from the request body
*/
protected static $body;
/** /**
* Constructor. * Constructor.
* *
@ -201,20 +196,20 @@ class Request {
* *
* @return string Raw HTTP request body * @return string Raw HTTP request body
*/ */
public static function getBody() public static function getBody() {
{ static $body;
if (!is_null(self::$body)) {
return self::$body; if (!is_null($body)) {
return $body;
} }
$body = '';
$method = self::getMethod(); $method = self::getMethod();
if ($method == 'POST' || $method == 'PUT') { if ($method == 'POST' || $method == 'PUT') {
$body = file_get_contents('php://input'); $body = file_get_contents('php://input');
} }
return self::$body = $body; return $body;
} }
/** /**

Loading…
Cancel
Save