diff --git a/src/ModelAbstract.php b/src/ModelAbstract.php index 3de8f3a..42f6a1a 100644 --- a/src/ModelAbstract.php +++ b/src/ModelAbstract.php @@ -106,7 +106,8 @@ public function toMap($objArray = null): ?array if (is_array($data) || is_object($data)) { $result = []; foreach ($data as $key => $value) { - $result[$key] = (is_array($value) || is_object($value)) ? $this->toMap($value) : $value; + if(strlen($value) > 0) + $result[$key] = (is_array($value) || is_object($value)) ? $this->toMap($value) : $value; } return $result;