Skip to content

Commit 78932aa

Browse files
authored
Update RequestBody.php
1 parent f09a332 commit 78932aa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/RequestBody.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,20 @@ public function __construct($contents, $encoding = '8bit')
4242
{
4343
case 'integer':
4444
case 'double':
45-
fwrite($this->h, (string)$contents);
45+
$str = (string)$contents;
4646
break;
4747

4848
case 'string':
49-
fwrite($this->h, $contents);
49+
$str = $contents;
5050
break;
5151

5252
case 'object':
5353
case 'array':
54-
fwrite($this->h, json_encode($contents));
54+
$str = json_encode(json_encode($contents);
5555
break;
5656

5757
case 'boolean':
58-
fwrite($this->h, $contents ? 'true' : 'false');
58+
$str = $contents ? 'true' : 'false';
5959
break;
6060
}
6161

@@ -289,4 +289,4 @@ public function getMetadata($key = null)
289289

290290
return null;
291291
}
292-
}
292+
}

0 commit comments

Comments
 (0)