Explorar o código

Fix bug where response status could be given to Response as a string, throwing type error

Robbie Averill %!s(int64=3) %!d(string=hai) anos
pai
achega
31ff159d3c
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      camel/Extraction/Response.php

+ 4 - 0
camel/Extraction/Response.php

@@ -21,6 +21,10 @@ class Response extends BaseDTO
             $parameters['content'] = json_encode($parameters['content']);
         }
 
+        if (isset($parameters['status'])) {
+            $parameters['status'] = (int) $parameters['status'];
+        }
+
         $hiddenHeaders = [
             'date',
             'Date',