Browse Source

Set lastAction to current url instead of empty string

ADmad 11 years ago
parent
commit
7e2efa4156
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/View/Helper/FormHelper.php

+ 3 - 3
src/View/Helper/FormHelper.php

@@ -368,14 +368,14 @@ class FormHelper extends Helper
         unset($options['templates']);
 
         if ($options['url'] === false) {
+            $url = $this->request->here(false);
             $action = null;
-            $this->_lastAction = '';
         } else {
             $url = $this->_formUrl($context, $options);
             $action = $this->Url->build($url);
-
-            $this->_lastAction($url);
         }
+
+        $this->_lastAction($url);
         unset($options['url'], $options['action'], $options['idPrefix']);
 
         $htmlAttributes = [];