From 045962ea87f31a45f3bf757b686c2e9dc6f36ac3 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 19 Jun 2007 21:13:17 +0000 Subject: [PATCH] * Avoid PHP notice errors when doing HTTP proxy purges for an empty list * As intended, *skip* the HTTP proxy purges when doing HTCP purges --- RELEASE-NOTES | 2 ++ includes/SquidUpdate.php | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f500a3006b..2388a62985 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -179,6 +179,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Escape the output of magic variables that return page name or part of it * (bug 10309) Initialise parser state properly in extractSections(), fixes some cases where section edits broke because tags were improperly stripped +* Avoid PHP notice errors when doing HTTP proxy purges for an empty list +* As intended, *skip* the HTTP proxy purges when doing HTCP purges == API changes since 1.10 == diff --git a/includes/SquidUpdate.php b/includes/SquidUpdate.php index 78cac6100d..65c85a2d6b 100644 --- a/includes/SquidUpdate.php +++ b/includes/SquidUpdate.php @@ -81,9 +81,14 @@ class SquidUpdate { echo implode("
\n", $urlArr) . "
\n"; return; }*/ + + if( empty( $urlArr ) ) { + return; + } - if ( $wgHTCPMulticastAddress && $wgHTCPPort ) - SquidUpdate::HTCPPurge( $urlArr ); + if ( $wgHTCPMulticastAddress && $wgHTCPPort ) { + return SquidUpdate::HTCPPurge( $urlArr ); + } $fname = 'SquidUpdate::purge'; wfProfileIn( $fname ); -- 2.20.1