]> _ Git - cubist_util.git/commitdiff
wait #7534 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 May 2025 11:08:36 +0000 (13:08 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 May 2025 11:08:36 +0000 (13:08 +0200)
src/WebVideo.php

index 93db97ec3f985c9e8b059145e0204c175a7ef542..64c402dd4d81d4c177481ea47e05373ee599cbb7 100644 (file)
@@ -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];