Skip to content

Commit 5a53afb

Browse files
committed
Bug fix: count() starts at 1
1 parent e05401f commit 5a53afb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database/factories/CustomFieldFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function definition()
3232
CustomField::TYPE_TEXTAREA => false,
3333
];
3434

35-
$type = array_keys($typesRequireAnswers)[rand(0, count($typesRequireAnswers))]; // Pick a random type
35+
$type = array_keys($typesRequireAnswers)[rand(0, count($typesRequireAnswers) - 1)]; // Pick a random type
3636

3737
return [
3838
'type' => $type,

0 commit comments

Comments
 (0)