Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing failing test caused by merge with 1.2

  • Loading branch information...
commit 826dbc466ff8f451fb11e6dde08c307a3e61869d 1 parent 1acc4c8
@markstory markstory authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 cake/libs/model/cake_schema.php
View
7 cake/libs/model/cake_schema.php
@@ -486,10 +486,13 @@ function compare($old, $new = null) {
if (isset($old[$table]['indexes']) && isset($new[$table]['indexes'])) {
$diff = $this->_compareIndexes($new[$table]['indexes'], $old[$table]['indexes']);
if ($diff) {
- if (isset($tables[$table]['drop']['indexes']) && isset($diff['drop'])) {
+ if (!isset($tables[$table])) {
+ $tables[$table] = array();
+ }
+ if (isset($diff['drop'])) {
$tables[$table]['drop']['indexes'] = $diff['drop'];
}
- if (isset($tables[$table]['add']['indexes']) && isset($diff['add'])) {
+ if ($diff && isset($diff['add'])) {
$tables[$table]['add']['indexes'] = $diff['add'];
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.