Skip to content

Commit eff7984

Browse files
committed
Disable json mapper strict null types
1 parent c9489b2 commit eff7984

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/EazyJsonRpc/BaseJsonRpcClient.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,10 @@ protected function processCalls( array $calls ): bool {
232232
* @throws \JsonMapper_Exception
233233
*/
234234
private function convertResult( BaseJsonRpcCall $call, string $returnType ) {
235-
$result = null;
236-
$mapper = new JsonMapper();
237-
$mapper->bEnforceMapType = false;
235+
$result = null;
236+
$mapper = new JsonMapper();
237+
$mapper->bEnforceMapType = false;
238+
$mapper->bStrictNullTypes = false;
238239
switch ( true ) {
239240
case substr( $returnType, -2 ) == '[]':
240241
$result = $mapper->mapArray( $call->Result, [], rtrim( $returnType, '[]' ) );

0 commit comments

Comments
 (0)