Skip to content

Commit

Permalink
[BUGFIX] avoid PHP Warning in StringValidator
Browse files Browse the repository at this point in the history
this happens if using Length Validation without Configuration
  • Loading branch information
achimfritz-b13 authored and mschwemer committed May 21, 2024
1 parent 8520cc4 commit 98a8694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Domain/Validator/StringValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ protected function validateRange(string $value, string $configuration): bool
protected function validateLength(string $value, string $configuration): bool
{
$values = GeneralUtility::trimExplode(',', $configuration, true);
if ((int)$values[0] <= 0) {
if (!isset($values[0]) || (int)$values[0] <= 0) {
return true;
}
if (!isset($values[1])) {
Expand Down

0 comments on commit 98a8694

Please sign in to comment.