another update for bake model validations

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6584 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-03-16 06:07:16 +00:00
parent a6fbe05964
commit aac0cecf49

View file

@ -282,7 +282,7 @@ class ModelTask extends Shell {
$choice = $guess; $choice = $guess;
} }
if ($choice !== $skip) { if ($choice !== $skip) {
if (is_numeric($choice) && isset($options[$choice])) { if (is_numeric($choice) && isset($choices[$choice])) {
$validate[$fieldName] = $choices[$choice]; $validate[$fieldName] = $choices[$choice];
} else { } else {
$validate[$fieldName] = $choice; $validate[$fieldName] = $choice;