From de77baa31a5f35f791458c2985b5b95542b15f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Lopes?= Date: Thu, 18 Dec 2014 20:28:51 +0000 Subject: [PATCH] issue 476 on upstream --- lib/Serialization.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Serialization.php b/lib/Serialization.php index db0208808..c048efd3f 100644 --- a/lib/Serialization.php +++ b/lib/Serialization.php @@ -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();;