From a29ea93ffdbe6e77eb7f7847ce08a06734fcdd76 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Fri, 29 Jul 2011 16:17:51 -0400 Subject: [PATCH] Passed nulls test. --- jsonld.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jsonld.php b/jsonld.php index b69ef34..faaa267 100644 --- a/jsonld.php +++ b/jsonld.php @@ -1314,7 +1314,11 @@ function _flatten($parent, $parentProperty, $value, $subjects) { $flattened = null; - if(is_array($value)) + if($value === null) + { + // drop null values + } + else if(is_array($value)) { // list of objects or a disjoint graph foreach($value as $v)