From 1921d0ff3e93da29f81a65afda20cce4d6a86cb8 Mon Sep 17 00:00:00 2001 From: ozh Date: Mon, 25 May 2015 21:39:40 +0200 Subject: [PATCH] Today I Learnt: you can't check consts for empty Doesn't work at all, interestingly for different reasons across PHP versions - http://3v4l.org/06f2E --- includes/functions-http.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/functions-http.php b/includes/functions-http.php index 8d71f9324..e399c79c3 100644 --- a/includes/functions-http.php +++ b/includes/functions-http.php @@ -76,9 +76,8 @@ function yourls_http_post_body( $url, $headers = array(), $data = array(), $opti function yourls_http_get_proxy() { $proxy = false; - if( defined( 'YOURLS_PROXY' ) && !empty( YOURLS_PROXY ) ) { + if( defined( 'YOURLS_PROXY' ) ) { $proxy = YOURLS_PROXY; - // Username (?) and password can be defined as an empty string : no check for empty() if( defined( 'YOURLS_PROXY_USERNAME' ) && defined( 'YOURLS_PROXY_PASSWORD' ) ) { $proxy = array( YOURLS_PROXY, YOURLS_PROXY_USERNAME, YOURLS_PROXY_PASSWORD ); }