Permalink
Browse files

Use _secureFieldName().

  • Loading branch information...
1 parent bbe801c commit 7ff09960feb59aa3923aacf9ef2c97b728e3a7c2 @ADmad ADmad committed Feb 22, 2014
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/View/Helper/FormHelper.php
@@ -1464,8 +1464,7 @@ public function file($fieldName, $options = array()) {
public function button($title, $options = array()) {
$options += array('type' => 'submit', 'escape' => false, 'secure' => false);
if (isset($options['name'])) {
- $name = str_replace(array('[', ']'), array('.', ''), $options['name']);
- $this->_secure($options['secure'], $name);
+ $this->_secure($options['secure'], $this->_secureFieldName($options));
}
unset($options['secure']);
@@ -1650,7 +1649,7 @@ public function submit($caption = null, $options = array()) {
if (isset($options['name'])) {
$name = str_replace(array('[', ']'), array('.', ''), $options['name']);
- $this->_secure($options['secure'], $name);
+ $this->_secure($options['secure'], $this->_secureFieldName($options));
}
unset($options['secure']);

0 comments on commit 7ff0996

Please sign in to comment.