Skip to content

Commit

Permalink
Merge branch '1.8' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Corepex committed Mar 12, 2024
2 parents fa5849b + 0653eb1 commit de0557e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Mapping/Operator/Factory/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public function process($inputData, bool $dryRun = false)
foreach ($inputData as &$data) {
if (!empty($data)) {
$data = \Carbon\Carbon::createFromFormat($this->format, $data);
} else {
$data = null;
}
}

Expand Down
2 changes: 2 additions & 0 deletions tests/unit/FactoryOperatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ public function testDate() {
$preview = $date->generateResultPreview($resultArray);
$this->assertIsArray($preview);

$result = $date->process('');
$this->assertNull($result);
}

public function testGallery() {
Expand Down

0 comments on commit de0557e

Please sign in to comment.