File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
lib/internal/Magento/Framework/App/Request Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,8 @@ public function getFrontName()
223
223
public function setRouteName ($ route )
224
224
{
225
225
$ this ->route = $ route ;
226
- if ($ module = $ this ->routeConfig ->getRouteFrontName ($ route )) {
226
+ $ module = $ this ->routeConfig ->getRouteFrontName ($ route );
227
+ if ($ module ) {
227
228
$ this ->setModuleName ($ module );
228
229
}
229
230
return $ this ;
@@ -414,7 +415,11 @@ public function __sleep()
414
415
public function isSafeMethod ()
415
416
{
416
417
if ($ this ->isSafeMethod === null ) {
417
- $ this ->isSafeMethod = in_array ($ _SERVER ['REQUEST_METHOD ' ] ?? null , $ this ->safeRequestTypes , true );
418
+ if (isset ($ _SERVER ['REQUEST_METHOD ' ]) && (in_array ($ _SERVER ['REQUEST_METHOD ' ], $ this ->safeRequestTypes ))) {
419
+ $ this ->isSafeMethod = true ;
420
+ } else {
421
+ $ this ->isSafeMethod = false ;
422
+ }
418
423
}
419
424
return $ this ->isSafeMethod ;
420
425
}
You can’t perform that action at this time.
0 commit comments