mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Applying optimization in Dispatcher::parseParams() from 'robustsolution'. Fixes #309
This commit is contained in:
parent
17e377de7e
commit
6039d6ebe4
1 changed files with 1 additions and 1 deletions
|
@ -271,7 +271,7 @@ class Dispatcher extends Object {
|
|||
$params['form']['_method'] = env('HTTP_X_HTTP_METHOD_OVERRIDE');
|
||||
}
|
||||
if (isset($params['form']['_method'])) {
|
||||
if (isset($_SERVER) && !empty($_SERVER)) {
|
||||
if (!empty($_SERVER)) {
|
||||
$_SERVER['REQUEST_METHOD'] = $params['form']['_method'];
|
||||
} else {
|
||||
$_ENV['REQUEST_METHOD'] = $params['form']['_method'];
|
||||
|
|
Loading…
Add table
Reference in a new issue