Skip to content

Commit

Permalink
Use _secureFieldName().
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Feb 22, 2014
1 parent bbe801c commit 7ff0996
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/View/Helper/FormHelper.php
Expand Up @@ -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']);

Expand Down Expand Up @@ -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']);

Expand Down

0 comments on commit 7ff0996

Please sign in to comment.