Skip to content

Commit

Permalink
A better fix for issue #2711. Allows url to be unset from request arr…
Browse files Browse the repository at this point in the history
…ay regardless of this->base context
  • Loading branch information
Patrick Barabe committed Feb 19, 2014
1 parent a9d7792 commit a69aeb6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Cake/Network/CakeRequest.php
Expand Up @@ -207,8 +207,9 @@ protected function _processGet() {
$query = $_GET;
}

unset($query['/' . str_replace('.', '_', urldecode($this->url))]);
unset($query[$this->base . '/' . str_replace('.', '_', urldecode($this->url))]);
$unsetUrl = '/' . str_replace('.', '_', urldecode($this->url));
unset($query[$unsetUrl]);
unset($query[$this->base . $unsetUrl]);
if (strpos($this->url, '?') !== false) {
list(, $querystr) = explode('?', $this->url);
parse_str($querystr, $queryArgs);
Expand Down

0 comments on commit a69aeb6

Please sign in to comment.