소스 검색

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

Robbie Averill 3 년 전
부모
커밋
31ff159d3c
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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',