fix: Make sure provider provides enum values

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
pull/46722/head
Marcel Klehr 4 months ago
parent 6363437ccb
commit aaa8af4b49
  1. 5
      lib/private/TaskProcessing/Manager.php

@ -539,7 +539,10 @@ class Manager implements IManager {
}
try {
$type->validateInput($io[$key]);
if (isset($enumValues[$key])) {
if ($type === EShapeType::Enum) {
if (!isset($enumValues[$key])) {
throw new ValidationException('Provider did not provide enum values for an enum slot: "' . $key .'"');
}
$type->validateEnum($io[$key], $enumValues[$key]);
}
} catch (ValidationException $e) {

Loading…
Cancel
Save