From 2c18df139a3811647ff49124ae4d1dace3b58f96 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 13 May 2025 13:08:36 +0200 Subject: [PATCH] wait #7534 @0.25 --- src/WebVideo.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/WebVideo.php b/src/WebVideo.php index 93db97e..64c402d 100644 --- a/src/WebVideo.php +++ b/src/WebVideo.php @@ -23,6 +23,9 @@ class WebVideo $service = self::_findService($url); if ($service) { $videoId = self::_findVideoId($url, $service); + if ($videoId === null) { + return false; + } if ($videoId) { $res = $service . ':' . $videoId; } else { @@ -159,7 +162,7 @@ class WebVideo $r = Text::parseUrl($url); if ($service == 'youtube') { if (stristr($url, 'playlist')) { - return false; + return null; } if (preg_match("/^(?:http(?:s)?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user|shorts)\/))([^\?&\"'>]+)/", $url, $matches)) { return $matches[1]; -- 2.39.5