Skip to content

Commit

Permalink
issue 476 on upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
lfglopes committed Dec 18, 2014
1 parent 083c446 commit de77baa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Serialization.php
Expand Up @@ -173,7 +173,11 @@ private function check_include()
try {
$assoc = $this->model->$association;

if (!is_array($assoc))
if (is_null($assoc))
{
$this->attributes[$association] = null;
}
elseif (!is_array($assoc))
{
$serialized = new $serializer_class($assoc, $options);
$this->attributes[$association] = $serialized->to_a();;
Expand Down

0 comments on commit de77baa

Please sign in to comment.