Skip to content

Commit 9cbba12

Browse files
authored
Merge pull request #78 from drossha/2.0
Don't pass null to isBinaryData
2 parents 0f4f48b + 034e45f commit 9cbba12

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Codeception/Module/REST.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public function _inject(InnerBrowser $connection)
180180

181181
public function _failed(TestInterface $test, $fail)
182182
{
183-
if ($this->response === '' || $this->response === '0') {
183+
if ($this->response === null || $this->response === '' || $this->response === '0') {
184184
return;
185185
}
186186

@@ -706,7 +706,7 @@ protected function execute($method, $url, $parameters = [], $files = [])
706706
}
707707

708708
$printedResponse = $this->response;
709-
if ($this->isBinaryData((string) $printedResponse)) {
709+
if ($this->isBinaryData((string)$printedResponse)) {
710710
$printedResponse = $this->binaryToDebugString($printedResponse);
711711
}
712712

@@ -1000,7 +1000,7 @@ public function seeResponseIsValidOnJsonSchema(string $schemaFilename): void
10001000
* @param string $jsonString the json encoded string
10011001
* @param string $errorFormat optional string for custom sprintf format
10021002
*/
1003-
protected function decodeAndValidateJson(string $jsonString, string $errorFormat="Invalid json: %s. System message: %s.")
1003+
protected function decodeAndValidateJson(string $jsonString, string $errorFormat = "Invalid json: %s. System message: %s.")
10041004
{
10051005
$json = json_decode($jsonString);
10061006
$errorCode = json_last_error();

0 commit comments

Comments
 (0)