Skip to content

Commit 4463412

Browse files
authored
Merge pull request #10 from phpugph/1.0
1.0
2 parents c896940 + dd05fe2 commit 4463412

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/Curl/Rest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,11 @@ public function send(string $method, string $path)
249249
$data = json_encode($data);
250250
break;
251251
case CurlHandler::ENCODE_QUERY:
252-
default:
253252
$data = http_build_query($data);
254253
break;
254+
case CurlHandler::ENCODE_RAW:
255+
default:
256+
break;
255257
}
256258
//it's a get or delete
257259
} else {

src/Terminal/TerminalTrait.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ public function run(bool $emulate = false): bool
8686
$this->processor = [$this, 'main'];
8787
}
8888

89-
$continue = $this->prepare()
90-
&& $response->getStatus() == 200
91-
&& $this->process();
89+
$continue = $this->prepare();
90+
if ($continue && $response->getStatus() == 200) {
91+
$continue = $this->process();
92+
}
9293

9394
if (!$continue) {
9495
return false;

0 commit comments

Comments
 (0)