From 646db4ce48d14f7d4a6d6f879c7d161ad0c40154 Mon Sep 17 00:00:00 2001 From: ashubawork Date: Thu, 11 Apr 2024 11:41:45 +0300 Subject: [PATCH] - fix youtube validation --- includes/um-short-functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/um-short-functions.php b/includes/um-short-functions.php index a26f0d5a..14f87d26 100644 --- a/includes/um-short-functions.php +++ b/includes/um-short-functions.php @@ -1912,6 +1912,9 @@ function um_profile( $key ) { * @return bool|string */ function um_youtube_id_from_url( $url ) { + if ( ! $url ) { + return true; + } $url = preg_replace( '/&ab_channel=.*/', '', $url ); // ADBlock argument. $url = preg_replace( '/\?si=.*/', '', $url ); // referral attribute.