Skip to content

Commit aa70013

Browse files
author
john.brichevans
committed
Allow null values to be passed as a valid value
1 parent 9339fe2 commit aa70013

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/GDS/Mapper/RESTv1.php

+5
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,11 @@ protected function createPropertyValue(array $arr_field_def, $mix_value)
401401
}
402402
$obj_property_value->excludeFromIndexes = !$bol_index;
403403

404+
if (is_null($mix_value)) {
405+
$obj_property_value->nullValue = $mix_value;
406+
return $obj_property_value;
407+
}
408+
404409
switch ($arr_field_def['type']) {
405410
case Schema::PROPERTY_STRING:
406411
$obj_property_value->stringValue = (string)$mix_value;

0 commit comments

Comments
 (0)