Skip to content

Commit

Permalink
casting schema to array, fixes error for array_keys when return is null
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Jun 1, 2012
1 parent e5eb7b4 commit 048dc8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 048dc8d

Please sign in to comment.