Fix incorrectly generated URL path.

Refs #3442
This commit is contained in:
mark_story 2014-05-07 08:43:25 -04:00
parent 1103ca7816
commit 5469840c80
2 changed files with 2 additions and 2 deletions

View file

@ -1378,7 +1378,7 @@ class FormHelperTest extends CakeTestCase {
public function testSecuredFormUrlIgnoresHost() {
$this->Form->request['_Token'] = array('key' => 'testKey');
$expected = '5181b484c13caea4776618ed26a3aebbb026ecd8%3A';
$expected = '0ff0c85cd70584d8fd18fa136846d22c66c21e2d%3A';
$this->Form->create('Address', array(
'url' => array('controller' => 'articles', 'action' => 'view', 1, '?' => array('page' => 1))
));

View file

@ -468,7 +468,7 @@ class FormHelper extends AppHelper {
}
$query = parse_url($action, PHP_URL_QUERY);
if ($query) {
$query .= '?';
$query = '?' . $query;
}
$this->_lastAction = parse_url($action, PHP_URL_PATH) . $query;