Skip to content

Commit

Permalink
Prevent blackhole auth error where are present multi fields (part 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano Zoffoli committed Mar 13, 2012
1 parent af57502 commit 60b9cd8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/Cake/View/Helper/FormHelper.php
Expand Up @@ -604,12 +604,8 @@ protected function _secure($lock, $field = null, $value = null) {
}
}

$last = end($field);
if (is_numeric($last) || empty($last)) {
array_pop($field);
}

$field = implode('.', $field);
$field = preg_replace('/(\.\d+)+$/', '', $field);

if ($lock) {
if (!in_array($field, $this->fields)) {
Expand Down

0 comments on commit 60b9cd8

Please sign in to comment.