diff options
author | Marcel Klehr <mklehr@gmx.net> | 2025-04-11 09:26:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-11 09:26:44 +0200 |
commit | d16bc3b550e370371760e6f7535764f4bcc0f2c9 (patch) | |
tree | 37b495d5fc8205318a7d84ddd28aaa656d5ec203 | |
parent | 345167ff182a32cab2915070da19db6a5ed2ba96 (diff) | |
parent | b4dcace2acce0fbe6fc4c27d6eb444b6445202b1 (diff) | |
download | nextcloud-server-d16bc3b550e370371760e6f7535764f4bcc0f2c9.tar.gz nextcloud-server-d16bc3b550e370371760e6f7535764f4bcc0f2c9.zip |
Merge pull request #52116 from nextcloud/Lukasdotcom-fix/fileids
Fix(TaskProcessing): for validation for taskprocessing EShapeType
-rw-r--r-- | lib/public/TaskProcessing/EShapeType.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/public/TaskProcessing/EShapeType.php b/lib/public/TaskProcessing/EShapeType.php index cd8d6d837da..f6cfab6b38f 100644 --- a/lib/public/TaskProcessing/EShapeType.php +++ b/lib/public/TaskProcessing/EShapeType.php @@ -154,19 +154,19 @@ enum EShapeType: int { if ($this === EShapeType::ListOfImages && (!is_array($value) || count(array_filter($value, fn ($item) => !is_numeric($item))) > 0)) { throw new ValidationException('Non-image list item provided for ListOfImages slot'); } - if ($this === EShapeType::Audio && !is_string($value)) { + if ($this === EShapeType::Audio && !is_numeric($value)) { throw new ValidationException('Non-audio item provided for Audio slot'); } if ($this === EShapeType::ListOfAudios && (!is_array($value) || count(array_filter($value, fn ($item) => !is_numeric($item))) > 0)) { throw new ValidationException('Non-audio list item provided for ListOfAudio slot'); } - if ($this === EShapeType::Video && !is_string($value)) { + if ($this === EShapeType::Video && !is_numeric($value)) { throw new ValidationException('Non-video item provided for Video slot'); } if ($this === EShapeType::ListOfVideos && (!is_array($value) || count(array_filter($value, fn ($item) => !is_numeric($item))) > 0)) { throw new ValidationException('Non-video list item provided for ListOfTexts slot'); } - if ($this === EShapeType::File && !is_string($value)) { + if ($this === EShapeType::File && !is_numeric($value)) { throw new ValidationException('Non-file item provided for File slot'); } if ($this === EShapeType::ListOfFiles && (!is_array($value) || count(array_filter($value, fn ($item) => !is_numeric($item))) > 0)) { |