File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -178,9 +178,8 @@ private function _detectUri()
178178 } elseif ($ this ->_request ->getMethod () === RequestMethod::PUT || $ this ->_request ->getMethod () === RequestMethod::PATCH ) {
179179 $ handle = fopen ("php://input " , "r " );
180180 $ rawData = '' ;
181- while ($ chunk = fread ($ handle , 1024 )) {
182- $ rawData .= $ chunk ;
183- }
181+ while ($ chunk = fread ($ handle , 1024 )) $ rawData .= $ chunk ;
182+ fclose ($ handle );
184183
185184 switch ($ contentType ) {
186185 case "application/json " :
@@ -189,7 +188,7 @@ private function _detectUri()
189188 case "application/xml " :
190189 $ data = (array )simplexml_load_string ($ rawData );
191190 break ;
192- default :
191+ case " application/x-www-form-urlencoded " :
193192 parse_str ($ rawData , $ data );
194193 break ;
195194 }
@@ -203,6 +202,9 @@ private function _detectUri()
203202 case "application/xml " :
204203 $ data = (array )simplexml_load_string ($ rawData );
205204 break ;
205+ case "application/x-www-form-urlencoded " :
206+ parse_str ($ rawData , $ data );
207+ break ;
206208 }
207209 }
208210
You can’t perform that action at this time.
0 commit comments