File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -88,17 +88,17 @@ public static function input(bool $safeData = true)
8888 {
8989 $ handler = fopen ('php://input ' , 'r ' );
9090 $ data = stream_get_contents ($ handler );
91- $ content_type = Headers::get ('Content-Type ' ) ?? '' ;
91+ $ contentType = Headers::get ('Content-Type ' ) ?? '' ;
9292
93- if ($ content_type === 'application/x-www-form-urlencoded ' ) {
93+ if ($ contentType === 'application/x-www-form-urlencoded ' ) {
9494 $ d = $ data ;
9595 $ data = [];
9696
9797 foreach (explode ('& ' , $ d ) as $ chunk ) {
9898 $ param = explode ('= ' , $ chunk );
9999 $ data [$ param [0 ]] = urldecode ($ param [1 ]);
100100 }
101- } else if (strpos ($ content_type , 'application/json ' ) !== 0 && strpos ($ content_type , 'multipart/form-data ' ) !== 0 ) {
101+ } else if (strpos ($ contentType , 'application/json ' ) !== 0 && strpos ($ contentType , 'multipart/form-data ' ) !== 0 ) {
102102 $ safeData = false ;
103103 $ data = [$ data ];
104104 } else {
@@ -358,7 +358,7 @@ public static function errors()
358358 */
359359 public static function getContentType (): ?string
360360 {
361- return Headers::get ('CONTENT_TYPE ' );
361+ return Headers::get ('Content-Type ' );
362362 }
363363
364364 /**
You can’t perform that action at this time.
0 commit comments