File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
bridges/php-local/LocalBridge Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ public function handle()
103103 if (isset ($ _GET )) {
104104 $ queries = $ _GET ;
105105 }
106-
106+
107107 if (isset ($ this ->callbacks ['before ' ])) {
108108 $ this ->callbacks ['before ' ]($ queries , $ body ['data ' ], $ body ['files ' ]);
109109 }
@@ -150,17 +150,17 @@ private function parseBody()
150150 $ data = null ;
151151 $ files = null ;
152152
153- if (isset ($ _POST ) || !empty ($ _POST )) {
153+ if (isset ($ _POST ) && !empty ($ _POST )) {
154154 $ data = $ _POST ;
155155 }
156156
157- if (isset ($ _FILES ) || !empty ($ _FILES )) {
157+ if (isset ($ _FILES ) && !empty ($ _FILES )) {
158158 $ files = $ _FILES ;
159159 }
160160
161161 //In case of PUT request or request with json body
162162 if ($ data === null ) {
163- if (isset ($ _SERVER ["CONTENT_TYPE " ]) || strpos ($ _SERVER ["CONTENT_TYPE " ], 'application/json ' ) !== false ) {
163+ if (isset ($ _SERVER ["CONTENT_TYPE " ]) && strpos ($ _SERVER ["CONTENT_TYPE " ], 'application/json ' ) !== false ) {
164164 $ input = file_get_contents ('php://input ' );
165165
166166 $ data = json_decode ($ input , true );
@@ -190,7 +190,7 @@ private function verifyAuthentication()
190190
191191 if (isset ($ headers ['Authorization ' ])) {
192192 $ token = str_replace ('Token ' , '' , $ headers ['Authorization ' ]);
193-
193+
194194 $ authenticated = token::verify ($ token );
195195 }
196196
You can’t perform that action at this time.
0 commit comments