Skip to content
Browse files

casting schema to array, fixes error for array_keys when return is null

  • Loading branch information...
1 parent e5eb7b4 commit 048dc8d254bbb96180545dad6040521fde12b3cf @ceeram ceeram committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/Model.php
View
2 lib/Cake/Model/Model.php
@@ -1166,7 +1166,7 @@ public function set($one, $two = null) {
*/
protected function _setAliasData($data) {
$models = array_keys($this->getAssociated());
- $schema = array_keys($this->schema());
+ $schema = array_keys((array)$this->schema());
foreach ($data as $field => $value) {
if (in_array($field, $schema) || !in_array($field, $models)) {
$data[$this->alias][$field] = $value;

0 comments on commit 048dc8d

Please sign in to comment.
Something went wrong with that request. Please try again.