Browse Source

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

Robbie Averill 3 năm trước cách đây
mục cha
commit
31ff159d3c
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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',