Merge pull request #5137 from watermark/patch-1

Cleanup of isUnique
This commit is contained in:
Mark Story 2014-11-11 17:27:09 -05:00
commit 2addee9808

View file

@ -3315,9 +3315,10 @@ class Model extends Object implements CakeEventListener {
} }
if (!is_array($fields)) { if (!is_array($fields)) {
$fields = func_get_args(); $fields = func_get_args();
if (is_bool($fields[count($fields) - 1])) { $fieldCount = count($fields) - 1;
$or = $fields[count($fields) - 1]; if (is_bool($fields[$fieldCount])) {
unset($fields[count($fields) - 1]); $or = $fields[$fieldCount];
unset($fields[$fieldCount]);
} }
} }