Skip to content

Commit

Permalink
refactor: address failing test of illegal offset
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaHungDinh committed Apr 30, 2024
1 parent a7c7761 commit 99322ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FormBuilder/BlockModels/DonationAmountBlockModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function getLevels(): array
return array_map(static function($level) {
return [
'label' => (string)filter_var($level['label'] ?? '', FILTER_SANITIZE_STRING),
'value' => (float)filter_var($level['value'], FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION),
'value' => (float)filter_var($level['value'] ?? '', FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION),
'checked' => (bool)filter_var($level['checked'] ?? false, FILTER_VALIDATE_BOOLEAN),
];
}, $this->block->getAttribute('levels'));
Expand Down

0 comments on commit 99322ff

Please sign in to comment.