From: Brion Vibber Date: Sun, 12 Dec 2004 03:54:20 +0000 (+0000) Subject: Fix notice error on UA check when no user-agent header sent X-Git-Tag: 1.5.0alpha1~1104 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=98537591d326b824119670d2a6ac3577e2499e5e;p=lhc%2Fweb%2Fwiklou.git Fix notice error on UA check when no user-agent header sent --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 667cd78252..2597557603 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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;