diff --git a/function.php b/function.php index 00756796..2c260c81 100644 --- a/function.php +++ b/function.php @@ -46,12 +46,8 @@ if (!function_exists('isUrl')) { */ function isUrl($url, $get_info = true) { - try { - $queryMatch = '/((http[s]?):\/\/)?(([\w\-\_]+\.)+\w+(:\d+)?)(\/.*)?/'; - if (!preg_match($queryMatch, $url, $outPut)) { - return false; - } - }catch (Throwable $exception){ + $queryMatch = '/((http[s]?):\/\/)?(([\w\-\_]+\.)+\w+(:\d+)?)(\/.*)?/'; + if (!preg_match($queryMatch, $url, $outPut)) { return false; } $port = str_replace(':', '', $outPut[5]);