Adding fix to allow empty multiple select when using the Security component. Prior to this fix a form would be considered invalid if nothing was selected.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5149 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-05-21 19:51:40 +00:00
parent f6f9cd69c4
commit 5332fa9cd2

View file

@ -795,7 +795,6 @@ class FormHelper extends AppHelper {
}
$this->setFormTag($fieldName);
$this->__secure();
$attributes = $this->domId((array)$attributes);
if ($this->tagIsInvalid()) {
@ -822,6 +821,7 @@ class FormHelper extends AppHelper {
$tag = $this->Html->tags['selectmultiplestart'];
} else {
$tag = $this->Html->tags['selectstart'];
$this->__secure();
}
$select[] = sprintf($tag, $this->model(), $this->field(), $this->Html->_parseAttributes($attributes));