diff --git a/plugins/content_distribution/providers/cortex/lib/CortexApiDistributionEngine.php b/plugins/content_distribution/providers/cortex/lib/CortexApiDistributionEngine.php index bec01cc4d36..f144bcf5079 100644 --- a/plugins/content_distribution/providers/cortex/lib/CortexApiDistributionEngine.php +++ b/plugins/content_distribution/providers/cortex/lib/CortexApiDistributionEngine.php @@ -421,8 +421,8 @@ protected function submitMetadata(KalturaCortexApiDistributionJobProviderData $a */ protected function getApiEndpointByMediaType(KalturaCortexApiDistributionJobProviderData $apiDistributionJobProviderData, bool $readApi) { $type = $apiDistributionJobProviderData->mediaType == KalturaMediaType::AUDIO ? 'Audio' : 'Video'; - $endPointType = str_replace(self::CORTEX_API_ENDPOINT, '[TYPE]', $type); - $endPoint = str_replace($endPointType, '[ACTION]', ($readApi ? 'Read' : 'Update')); + $endPointType = str_replace('[TYPE]', $type, self::CORTEX_API_ENDPOINT); + $endPoint = str_replace('[ACTION]', ($readApi ? 'Read' : 'Update'), $endPointType); return $endPoint; }