Fix notice error on UA check when no user-agent header sent
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 12 Dec 2004 03:54:20 +0000 (03:54 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 12 Dec 2004 03:54:20 +0000 (03:54 +0000)
includes/OutputPage.php

index 667cd78..2597557 100644 (file)
@@ -91,7 +91,8 @@ class OutputPage {
                        wfDebug( "CACHE DISABLED\n", false );
                        return;
                }
-               if( preg_match( '/MSIE ([1-4]|5\.0)/', $_SERVER["HTTP_USER_AGENT"] ) ) {
+               if( isset( $_SERVER["HTTP_USER_AGENT"] ) &&
+                   preg_match( '/MSIE ([1-4]|5\.0)/', $_SERVER["HTTP_USER_AGENT"] ) ) {
                        # IE 5.0 has probs with our caching
                        wfDebug( "-- bad client, not caching\n", false );
                        return;