Make WordPress Core

Ticket #30297: get-calendar-http-user-agent.patch

File get-calendar-http-user-agent.patch, 716 bytes (added by elusiveunit, 12 years ago)
  • wp-includes/general-template.php

     
    16651665                $daywithpost = array();
    16661666        }
    16671667
    1668         if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'camino') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'safari') !== false)
     1668        $ua = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '';
     1669        if ( strpos($ua, 'MSIE') !== false || stripos($ua, 'camino') !== false || stripos($ua, 'safari') !== false )
    16691670                $ak_title_separator = "\n";
    16701671        else
    16711672                $ak_title_separator = ', ';