Skip to content

Commit 79eea10

Browse files
committed
Cast the parsed body to array, and add support for PHP 8
1 parent 283e9e3 commit 79eea10

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414
],
1515
"require": {
16-
"php": "^7.1.10",
16+
"php": ">=7.1.10",
1717
"ext-curl": "*",
1818
"elementaryframework/events": "^0.0.1",
1919
"elementaryframework/streams": "^0.0.2"
@@ -39,4 +39,4 @@
3939
"ElementaryFramework\\WaterPipe\\": "src/WaterPipe/"
4040
}
4141
}
42-
}
42+
}

src/WaterPipe/Routing/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ private function _detectUri()
187187

188188
switch ($contentType) {
189189
case "application/json":
190-
$data = new RequestData(json_decode($rawData, true));
190+
$data = new RequestData((array)json_decode($rawData, true));
191191
break;
192192
case "application/xml":
193193
$data = new RequestData((array)simplexml_load_string($rawData));

0 commit comments

Comments
 (0)