mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-08-14 00:02:36 +00:00
Merge branch 'master' into 2.3
This commit is contained in:
commit
c83e941497
13 changed files with 85 additions and 15 deletions
|
@ -232,6 +232,7 @@ class RequestHandlerComponent extends Component {
|
|||
|
||||
/**
|
||||
* Handles (fakes) redirects for Ajax requests using requestAction()
|
||||
* Modifies the $_POST and $_SERVER['REQUEST_METHOD'] to simulate a new GET request.
|
||||
*
|
||||
* @param Controller $controller A reference to the controller
|
||||
* @param string|array $url A string or array containing the redirect location
|
||||
|
@ -243,6 +244,7 @@ class RequestHandlerComponent extends Component {
|
|||
if (!$this->request->is('ajax')) {
|
||||
return;
|
||||
}
|
||||
$_SERVER['REQUEST_METHOD'] = 'GET';
|
||||
foreach ($_POST as $key => $val) {
|
||||
unset($_POST[$key]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue