Skip to content

Commit 165c7ab

Browse files
committed
Release version 2.0.3
1 parent a106285 commit 165c7ab

File tree

5 files changed

+152
-138
lines changed

5 files changed

+152
-138
lines changed

composer.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,24 @@
2121
"require": {
2222
"ext-curl": "*",
2323
"ext-json": "*",
24+
"ext-iconv": "*",
2425
"paragonie/random_compat": "^9.99",
25-
"paragonie/sodium_compat": "^1.14",
26+
"paragonie/sodium_compat": "^1.16",
2627
"ircmaxell/password-compat": "^1.0",
27-
"symfony/http-foundation": "^5.2",
28-
"php-curl-class/php-curl-class": "^8.9",
29-
"guzzlehttp/guzzle": "^7.2",
28+
"symfony/http-foundation": "^5.3 || ^4.4",
29+
"php-curl-class/php-curl-class": "^9.3",
30+
"guzzlehttp/guzzle": "^7.3",
3031
"markrogoyski/ipv4-subnet-calculator": "^3.1",
31-
"mlocati/ip-lib": "^1.14",
32-
"nguyenanhung/nusoap": "^0.9.5",
32+
"mlocati/ip-lib": "^1.16",
33+
"nguyenanhung/nusoap": "^0.9",
3334
"nguyenanhung/my-debug": "^2.0"
3435
},
3536
"require-dev": {
36-
"kint-php/kint": "^3.0"
37+
"kint-php/kint": "^3.3"
3738
},
3839
"suggest": {
40+
"ext-curl": "Needed to support cURL",
41+
"ext-json": "Needed to support JSON",
3942
"ext-iconv": "Needed to support iconv",
4043
"ext-openssl": "Needed to support SSL",
4144
"ext-mbstring": "Needed to support mb_string"

src/CurlData.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,11 @@ public function createCurl($url = '')
650650
$this->error = $this->curl_error || $this->http_error;
651651
$this->error_code = $this->error ? ($this->curl_error ? $this->curl_error_code : $this->http_status_code) : 0;
652652
$this->request_headers = preg_split('/\r\n/', curl_getinfo($curl, CURLINFO_HEADER_OUT), NULL, PREG_SPLIT_NO_EMPTY);
653-
$this->http_error_message = $this->error ? (isset($this->response_headers['0']) ? $this->response_headers['0'] : '') : '';
653+
if (isset($this->response_headers['0'])) {
654+
$this->http_error_message = $this->error ? ($this->response_headers['0']) : '';
655+
} else {
656+
$this->http_error_message = $this->error ? ('') : '';
657+
}
654658
$this->error_message = $this->curl_error ? $this->curl_error_message : $this->http_error_message;
655659
curl_close($curl);
656660

src/MyRequests.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ public function setErrorResponseIsData($errorResponseIsData = FALSE)
462462
*
463463
* @param bool $errorResponseIsNull TRUE if Response is Null if Error
464464
*
465-
* @return mixed|$this
465+
* @return $this
466466
* @author: 713uk13m <[email protected]>
467467
* @time : 10/7/18 23:04
468468
*
@@ -519,10 +519,10 @@ public function setDigestAuthentication($username = '', $password = '')
519519
/**
520520
* Function getHttpCode
521521
*
522-
* @return mixed
523-
* @author: 713uk13m <[email protected]>
524-
* @time : 10/7/18 23:16
525-
*
522+
* @return int
523+
* @author : 713uk13m <[email protected]>
524+
* @copyright: 713uk13m <[email protected]>
525+
* @time : 08/01/2021 12:11
526526
*/
527527
public function getHttpCode()
528528
{
@@ -532,10 +532,10 @@ public function getHttpCode()
532532
/**
533533
* Function getHttpMessage
534534
*
535-
* @return mixed
536-
* @author: 713uk13m <[email protected]>
537-
* @time : 10/7/18 23:16
538-
*
535+
* @return string|null
536+
* @author : 713uk13m <[email protected]>
537+
* @copyright: 713uk13m <[email protected]>
538+
* @time : 08/01/2021 12:09
539539
*/
540540
public function getHttpMessage()
541541
{
@@ -545,10 +545,10 @@ public function getHttpMessage()
545545
/**
546546
* Function getErrorCode
547547
*
548-
* @return mixed
549-
* @author: 713uk13m <[email protected]>
550-
* @time : 10/7/18 23:16
551-
*
548+
* @return int
549+
* @author : 713uk13m <[email protected]>
550+
* @copyright: 713uk13m <[email protected]>
551+
* @time : 08/01/2021 12:06
552552
*/
553553
public function getErrorCode()
554554
{
@@ -558,10 +558,10 @@ public function getErrorCode()
558558
/**
559559
* Function getRequestsHeader
560560
*
561-
* @return mixed
562-
* @author: 713uk13m <[email protected]>
563-
* @time : 10/7/18 23:16
564-
*
561+
* @return array|null
562+
* @author : 713uk13m <[email protected]>
563+
* @copyright: 713uk13m <[email protected]>
564+
* @time : 08/01/2021 12:04
565565
*/
566566
public function getRequestsHeader()
567567
{
@@ -571,10 +571,10 @@ public function getRequestsHeader()
571571
/**
572572
* Function getResponseHeader
573573
*
574-
* @return mixed
575-
* @author: 713uk13m <[email protected]>
576-
* @time : 10/7/18 23:16
577-
*
574+
* @return array|null
575+
* @author : 713uk13m <[email protected]>
576+
* @copyright: 713uk13m <[email protected]>
577+
* @time : 08/01/2021 12:01
578578
*/
579579
public function getResponseHeader()
580580
{
@@ -589,7 +589,7 @@ public function getResponseHeader()
589589
* @param array $data Data Content to be Request
590590
* @param string $method Set Method to be Request
591591
*
592-
* @return array|mixed|\Psr\Http\Message\ResponseInterface|\Psr\Http\Message\StreamInterface|string|null
592+
* @return array|\Psr\Http\Message\ResponseInterface|\Psr\Http\Message\StreamInterface|string|null
593593
*
594594
* @author : 713uk13m <[email protected]>
595595
* @copyright : 713uk13m <[email protected]>
@@ -741,7 +741,7 @@ public function guzzlePhpRequest($url = '', $data = array(), $method = 'GET')
741741
* @author: 713uk13m <[email protected]>
742742
* @time : 10/7/18 05:54
743743
*
744-
* @see https://packagist.org/packages/curl/curl
744+
* @see https://packagist.org/packages/php-curl-class/php-curl-class
745745
*/
746746
public function curlRequest($url = '', $data = array(), $method = 'GET')
747747
{
@@ -840,7 +840,7 @@ public function curlRequest($url = '', $data = array(), $method = 'GET')
840840
$this->requests_header = isset($curl->requestHeaders) ? $curl->requestHeaders : (isset($curl->request_headers)) ? $curl->request_headers : NULL;
841841
$this->response_header = isset($curl->responseHeaders) ? $curl->responseHeaders : (isset($curl->response_headers)) ? $curl->response_headers : NULL;
842842
// Response
843-
if (($curl->error)) {
843+
if (isset($curl->error)) {
844844
// Debug
845845
$this->logger->debug(__FUNCTION__, 'Full Data Curl Message and Http Message: ', $error_code);
846846
if ($this->errorResponseIsData === TRUE) {

src/ProjectInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
*/
1919
interface ProjectInterface
2020
{
21-
const VERSION = '2.0.2.1';
22-
const LAST_MODIFIED = '2021-03-18';
23-
const MIN_PHP_VERSION = '5.3';
21+
const VERSION = '2.0.3';
22+
const LAST_MODIFIED = '2021-08-01';
23+
const MIN_PHP_VERSION = '7.0';
2424
const GET = 'GET';
2525
const HEAD = 'HEAD';
2626
const DELETE = 'DELETE';

0 commit comments

Comments
 (0)