* Avoid PHP notice errors when doing HTTP proxy purges for an empty list
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 19 Jun 2007 21:13:17 +0000 (21:13 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 19 Jun 2007 21:13:17 +0000 (21:13 +0000)
* As intended, *skip* the HTTP proxy purges when doing HTCP purges

RELEASE-NOTES
includes/SquidUpdate.php

index f500a30..2388a62 100644 (file)
@@ -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 ==
index 78cac61..65c85a2 100644 (file)
@@ -81,9 +81,14 @@ class SquidUpdate {
                        echo implode("<br />\n", $urlArr) . "<br />\n";
                        return;
                }*/
+               
+               if( empty( $urlArr ) ) {
+                       return;
+               }
 
-               if ( $wgHTCPMulticastAddress && $wgHTCPPort )
-                       SquidUpdate::HTCPPurge( $urlArr );
+               if ( $wgHTCPMulticastAddress && $wgHTCPPort ) {
+                       return SquidUpdate::HTCPPurge( $urlArr );
+               }
 
                $fname = 'SquidUpdate::purge';
                wfProfileIn( $fname );