From 3920179c73e5b78591003ec36ea7991e7f06fd60 Mon Sep 17 00:00:00 2001 From: Jason Oster Date: Wed, 12 May 2010 15:26:49 +0000 Subject: Fix a bug with URL query strings in the new remote_filemtime() --- functions/date_functions.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'functions') diff --git a/functions/date_functions.php b/functions/date_functions.php index cd82fd5..a97e3ca 100644 --- a/functions/date_functions.php +++ b/functions/date_functions.php @@ -25,11 +25,9 @@ function remote_filemtime($url, $recurse = 0) { '' ); $uri['port'] = isset($uri['port']) ? $uri['port'] : 80; - $path = ( - (isset($uri['path']) || isset($uri['query'])) ? - (@$uri['path'] . @$uri['query']) : - '/' - ); + $uri['path'] = isset($uri['path']) ? $uri['path'] : '/'; + $uri['query'] = isset($uri['query']) ? ('?' . $uri['query']) : ''; + $path = $uri['path'] . $uri['query']; $auth = ( (isset($uri['user']) || isset($uri['pass'])) ? ('Authentication: Basic ' . base64_encode(@$uri['user'] . ':' . @$uri['pass']) . "\r\n") : -- cgit v1.2.3