Prevent E_NOTICE

This commit is contained in:
Nabil Kadimi
2019-12-28 00:37:30 +01:00
committed by GitHub
parent bc609c245f
commit 3fe6bd8afb

View File

@@ -183,10 +183,11 @@ if ( $dayswithposts ) {
$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";
else
} else {
$ak_title_separator = ', ';
}
$ak_titles_for_day = array();
$ak_post_titles = $wpdb->get_results("SELECT ID, post_title, post_date, DAYOFMONTH(post_date) as dom "