WordPress.org

Make WordPress Core

Ticket #10758: 10758-vars.patch

File 10758-vars.patch, 595 bytes (added by hakre, 9 years ago)
  • wp-includes/vars.php

     
    3737// Simple browser detection
    3838$is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = false;
    3939
     40if ( !isset($_SERVER['HTTP_USER_AGENT']) )
     41        $_SERVER['HTTP_USER_AGENT'] = '';
     42
    4043if (strpos($_SERVER['HTTP_USER_AGENT'], 'Lynx') !== false) {
    4144        $is_lynx = true;
    4245} elseif ( strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'chrome') !== false ) {