[Corona] Change return type for raw data
Review Request #885 — Created Nov. 15, 2022 and submitted
Information | |
---|---|
b.stoop | |
Lunr | |
fix/nobodypost | |
e36edaa... | |
Reviewers | |
lunr | |
Corona: Change return type for raw data
In a attempt to test a new POST api I forgot to send a body and got this response:
{ "data": {}, "status": { "code": 500, "message": "Return value of Lunr\\Corona\\Request::get_raw_data() must be of the type string, null returned" } }The probablity that this happens in with real requests is low but I still think this must be handled better
unit tests
-
-
src/Lunr/Corona/Request.php (Diff revision 1) I think it would be better to set the default value to an empty string
-
Change Summary:
- Changed
raw_data
default to NULL
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+4 -3) |
-
-
src/Lunr/Corona/Request.php (Diff revision 2) Let's just do
!== FALSE
since that's what we want to avoid.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+4 -3) |
Change Summary:
- Changed failing unit test
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+6 -5) |