File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -907,8 +907,8 @@ public function is_cli_request()
907907 public function method ($ upper = FALSE )
908908 {
909909 return ($ upper )
910- ? strtoupper ($ this ->server ('REQUEST_METHOD ' ))
911- : strtolower ($ this ->server ('REQUEST_METHOD ' ));
910+ ? strtoupper (( string ) $ this ->server ('REQUEST_METHOD ' ))
911+ : strtolower (( string ) $ this ->server ('REQUEST_METHOD ' ));
912912 }
913913
914914 // ------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -220,14 +220,8 @@ public function __construct()
220220 */
221221 public function csrf_verify ()
222222 {
223- if (isset ($ _SERVER ['REQUEST_METHOD ' ]) && $ _SERVER ['REQUEST_METHOD ' ] == '' ){
224- $ requestMethod = strtoupper ((string ) $ _SERVER ['REQUEST_METHOD ' ]);
225- } else {
226- $ requestMethod = '' ;
227- }
228-
229223 // If it's not a POST request we will set the CSRF cookie
230- if ($ requestMethod !== 'POST ' ) {
224+ if (strtoupper (( string ) $ _SERVER [ ' REQUEST_METHOD ' ]) !== 'POST ' ) {
231225 return $ this ->csrf_set_cookie ();
232226 }
233227
You can’t perform that action at this time.
0 commit comments