diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/ExposeUploadWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/ExposeUploadWorker.php index cb548ef48c..d27cd6c182 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Worker/ExposeUploadWorker.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/ExposeUploadWorker.php @@ -189,7 +189,7 @@ public function process(array $payload) if (in_array($payload['databoxId'], $sendVttField)) { foreach ($databox->get_meta_structure() as $meta) { - if (1 === preg_match('#^VideoTextTrack([a-z]{2}(?:[-_]\w+)?)#i', $meta->get_name(), $matches) && $caption->has_field($meta->get_name())) { + if (1 === preg_match('#^VideoTextTrack([a-z]{2}(?:[-_]\w+)?)$#i', trim($meta->get_name()), $matches) && $caption->has_field($meta->get_name())) { // retrieve value for the corresponding field $fieldValues = $record->get_caption()->get_field($meta->get_name())->get_values(); $fieldValue = array_pop($fieldValues);