diff --git a/src/Database/Database.php b/src/Database/Database.php index dfb78e486..12e824c40 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -1853,9 +1853,9 @@ public function encode(Document $collection, Document $document): Document $value = $document->getAttribute($key, null); // continue on optional param with no default - if (is_null($value) && is_null($default)) { - continue; - } + // if (is_null($value) && is_null($default)) { + // continue; + // } // assign default only if no no value provided if (is_null($value) && !is_null($default)) { @@ -1865,10 +1865,8 @@ public function encode(Document $collection, Document $document): Document } foreach ($value as &$node) { - if (($node !== null)) { - foreach ($filters as $filter) { - $node = $this->encodeAttribute($filter, $node, $document); - } + foreach ($filters as $filter) { + $node = $this->encodeAttribute($filter, $node, $document); } }