From 7709b8d662d6b54ff4f3129aaf208a98e2d4c558 Mon Sep 17 00:00:00 2001 From: Eugene Molotov Date: Fri, 31 Jul 2020 15:29:18 +0500 Subject: [PATCH] [VkBridge] Correct fallback behavior, when trying to get direct video links (#1670) --- bridges/VkBridge.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bridges/VkBridge.php b/bridges/VkBridge.php index 2e03790b..87eaef20 100644 --- a/bridges/VkBridge.php +++ b/bridges/VkBridge.php @@ -423,11 +423,11 @@ class VkBridge extends BridgeAbstract 'count' => 200 )); - if (isset($result['error'])) return; - - foreach($result['response']['items'] as $item) { - $video_id = strval($item['owner_id']) . '_' . strval($item['id']); - $this->videos[$video_id]['url'] = $item['player']; + if (!isset($result['error'])) { + foreach($result['response']['items'] as $item) { + $video_id = strval($item['owner_id']) . '_' . strval($item['id']); + $this->videos[$video_id]['url'] = $item['player']; + } } foreach($this->items as &$item) {