fixes #4111, empty array in model task when table indexes missing

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6458 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-02-14 04:48:40 +00:00
parent 0d2c0c1c6c
commit 1c894d0cfd

View file

@ -852,7 +852,7 @@ class ModelTask extends Shell {
} else {
$col = "\t\t\t'indexes' => array(";
$props = array();
foreach ($value as $key => $index) {
foreach ((array)$value as $key => $index) {
$props[] = "'{$key}' => array(".join(', ', $schema->__values($index)).")";
}
$col .= join(', ', $props);