From 59ff0febf51eb84c8ed48861f6f0863f6616f41c Mon Sep 17 00:00:00 2001 From: theres Date: Mon, 3 Aug 2015 14:02:40 +0200 Subject: http code should always be int --- src/PurpleCode/PCurl/PCurlException.php | 2 +- src/PurpleCode/PCurl/PCurlResponse.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PurpleCode/PCurl/PCurlException.php b/src/PurpleCode/PCurl/PCurlException.php index ccd9269..72d2054 100644 --- a/src/PurpleCode/PCurl/PCurlException.php +++ b/src/PurpleCode/PCurl/PCurlException.php @@ -43,7 +43,7 @@ class PCurlException extends \Exception public function __construct($message = "Exception", $httpCode = 400, $curlErrorCode = CURLE_OK, $previous = null) { parent::__construct($message, $curlErrorCode, $previous); - $this->httpCode = $httpCode; + $this->httpCode = intval($httpCode); } public function getHttpCode(){ diff --git a/src/PurpleCode/PCurl/PCurlResponse.php b/src/PurpleCode/PCurl/PCurlResponse.php index 7fbf849..5ab2d14 100644 --- a/src/PurpleCode/PCurl/PCurlResponse.php +++ b/src/PurpleCode/PCurl/PCurlResponse.php @@ -19,7 +19,7 @@ class PCurlResponse { public function __construct($header, $body, $httpCode) { $this->header = $header; $this->body = $body; - $this->httpCode = $httpCode; + $this->httpCode = intval($httpCode); } public function setBody($body) { -- cgit v1.1