From faf481fe9279abb18971986b20038cd1c69535aa Mon Sep 17 00:00:00 2001 From: ozh Date: Sat, 23 May 2015 23:46:45 +0200 Subject: [PATCH] Avoid notices during unit tests [skip ci] --- includes/functions-http.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/functions-http.php b/includes/functions-http.php index 5edcff6..290b1ae 100644 --- a/includes/functions-http.php +++ b/includes/functions-http.php @@ -127,6 +127,10 @@ function yourls_send_through_proxy( $url ) { return $pre; $check = @parse_url( $url ); + + if( !isset( $check['host'] ) ) { + return false; + } // Malformed URL, can not process, but this could mean ssl, so let through anyway. if ( $check === false ) -- 2.45.0