mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 04:01:47 +00:00
Add is_array_multidim()
This commit is contained in:
+9
-3
@@ -98,9 +98,7 @@ class Curl {
|
||||
|
||||
function _postfields($data) {
|
||||
if (is_array($data)) {
|
||||
$multidimensional = !(count($data) === count($data, COUNT_RECURSIVE));
|
||||
|
||||
if ($multidimensional) {
|
||||
if (is_array_multidim($data)) {
|
||||
$data = $this->http_build_multi_query($data);
|
||||
}
|
||||
else {
|
||||
@@ -169,3 +167,11 @@ class Curl {
|
||||
public $response_headers = NULL;
|
||||
public $response = NULL;
|
||||
}
|
||||
|
||||
function is_array_multidim($array) {
|
||||
if (!is_array($array)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return !(count($array) === count($array, COUNT_RECURSIVE));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user