Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
Update Client.php
Browse files Browse the repository at this point in the history
Добавил комментарии зачем нужно исправление
  • Loading branch information
Muraveiko authored Jul 20, 2021
1 parent b5d2798 commit 392390b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,19 @@ private function _do_request($method, $param)
'timeout' => $this->get_timeout,
'validMimeTypes' => 'application/json'
]);

// fix http_buid
$param = array_map(function($item) {
if ($item === true)
$item = 'true';
$item = 'true'; // ошибочно приводит к 1
else if ($item === false) {
$item = 'false';
$item = 'false'; // а тут подставляет ноль
}
return $item;
}, $param);



$r = $curler->get($this->api_url . $method . '?' . http_build_query($param));
if ($r === false) {
$curler_error = $curler->getError();
Expand Down

0 comments on commit 392390b

Please sign in to comment.