Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BUG REPORT It is not safe to rely on the system's timezone settings.
#1
Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /plugins/news_manager/inc/functions.php on line 18

Showing loads of error messages on my site please anyone?


Code:
/*******************************************************
* @function nm_get_posts
* @param $all if true, include private and future posts
* @return array with posts
*/
function nm_get_posts($all=false) {
 $now = time();
 $posts = array();
 $data = @getXML(NMPOSTCACHE);
 foreach ($data->item as $item) {
   if ($all || $item->private != 'Y' && strtotime($item->date) < $now)   <~~~Line 18
     $posts[] = $item;
 }
 return $posts;
}
Pete

Chefbyte Services
Reply


Messages In This Thread
It is not safe to rely on the system's timezone settings. - by chefbyte - 2019-10-15, 03:40:57



Users browsing this thread: 1 Guest(s)