diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php index aff48328edb..2a04aa27803 100644 --- a/htdocs/core/boxes/box_external_rss.php +++ b/htdocs/core/boxes/box_external_rss.php @@ -127,7 +127,7 @@ class box_external_rss extends ModeleBoxes // Feed common fields $href = $item['link']; $title = urldecode($item['title']); - $date = $item['date_timestamp']; // date will be empty if conversion into timestamp failed + $date = empty($item['date_timestamp']) ? null : $item['date_timestamp']; // date will be empty if conversion into timestamp failed if ($rssparser->getFormat() == 'rss') { // If RSS if (!$date && isset($item['pubdate'])) { $date = $item['pubdate']; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 34d4120db24..14281e47a69 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2988,7 +2988,7 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli if (!empty($conf->global->MAIN_PHONE_SEPAR)) { $separ = $conf->global->MAIN_PHONE_SEPAR; } - if (empty($countrycode)) { + if (empty($countrycode) && is_object($mysoc)) { $countrycode = $mysoc->country_code; }