Merge pull request #371 from kadimi/patch-28

Prevent E_NOTICE
This commit is contained in:
Brian Miyaji
2020-03-30 15:30:49 +11:00
committed by GitHub

View File

@@ -183,10 +183,11 @@ if ( $dayswithposts ) {
$daywithpost = array(); $daywithpost = array();
} }
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'camino') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'safari') !== false) if ( array_key_exists( 'HTTP_USER_AGENT', $_SERVER ) && preg_match( 'MSIE|camino|safari', $_SERVER[ 'HTTP_USER_AGENT' ] ) ) {
$ak_title_separator = "\n"; $ak_title_separator = "\n";
else } else {
$ak_title_separator = ', '; $ak_title_separator = ', ';
}
$ak_titles_for_day = array(); $ak_titles_for_day = array();
$ak_post_titles = $wpdb->get_results("SELECT ID, post_title, post_date, DAYOFMONTH(post_date) as dom " $ak_post_titles = $wpdb->get_results("SELECT ID, post_title, post_date, DAYOFMONTH(post_date) as dom "