File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,12 +232,14 @@ private function exportDocuments(int $batchSize): void
232232 continue ;
233233 }
234234
235- $ parsedData [$ key ] = match ($ type ) {
236- Attribute::TYPE_INTEGER => is_numeric ($ parsedValue ) ? (int ) $ parsedValue : null ,
237- Attribute::TYPE_FLOAT => is_numeric ($ parsedValue ) ? (float ) $ parsedValue : null ,
238- Attribute::TYPE_BOOLEAN => filter_var ($ parsedValue , FILTER_VALIDATE_BOOLEAN ),
239- default => $ parsedValue ,
240- };
235+ if ($ parsedValue !== '' ) {
236+ $ parsedData [$ key ] = match ($ type ) {
237+ Attribute::TYPE_INTEGER => is_numeric ($ parsedValue ) ? (int )$ parsedValue : null ,
238+ Attribute::TYPE_FLOAT => is_numeric ($ parsedValue ) ? (float )$ parsedValue : null ,
239+ Attribute::TYPE_BOOLEAN => filter_var ($ parsedValue , FILTER_VALIDATE_BOOLEAN ),
240+ default => $ parsedValue ,
241+ };
242+ }
241243 }
242244
243245 $ documentId = $ parsedData ['$id ' ] ?? 'unique() ' ;
You can’t perform that action at this time.
0 commit comments