Skip to content

Commit

Permalink
fix(fixtures): reset value only when we have a type
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesbh committed Jul 24, 2023
1 parent 0a3047d commit b84af0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Fixture/Factory/SettingsFixtureFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ public function create(array $options = []): SettingInterface
}
}

$setting->setValue(null); // reset the previous value according to the potential previous type
if (null !== $setting->getStorageType()) {
$setting->setValue(null); // reset the previous value according to the potential previous type
}
$setting->setStorageType($options['type']);
$setting->setValue($this->formatValue($options['type'], $options['value']));

Expand Down

0 comments on commit b84af0b

Please sign in to comment.