Sfoglia il codice sorgente

Properly support empty response content

shalvah 3 anni fa
parent
commit
4b37c2a327
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      camel/Extraction/Response.php

+ 1 - 1
camel/Extraction/Response.php

@@ -17,7 +17,7 @@ class Response extends BaseDTO
 
     public function __construct(array $parameters = [])
     {
-        if (is_array($parameters['content'])) {
+        if (is_array($parameters['content'] ?? null)) {
             $parameters['content'] = json_encode($parameters['content']);
         }