diff --git a/src/Command/FixtureCommand.php b/src/Command/FixtureCommand.php index bfcd64db..bf9a1d15 100644 --- a/src/Command/FixtureCommand.php +++ b/src/Command/FixtureCommand.php @@ -438,10 +438,12 @@ protected function _generateRecords(TableSchemaInterface $table, int $recordCoun } } else { $cases = $reflectionEnum->getCases(); - $firstCase = array_shift($cases); - /** @var \BackedEnum $firstValue */ - $firstValue = $firstCase->getValue(); - $insert = $firstValue->value; + if ($cases) { + $firstCase = array_shift($cases); + /** @var \BackedEnum $firstValue */ + $firstValue = $firstCase->getValue(); + $insert = $firstValue->value; + } } } }