MDL-73692 blocks: Add support for missing timestamps to rss block.

This commit is contained in:
Melanie Treitinger 2023-01-09 15:17:34 +01:00
parent 0780e87f06
commit e5709fc588

View File

@ -92,7 +92,11 @@ class renderer extends \plugin_renderer_base {
* @return string
*/
public function format_published_date($timestamp) {
return \core_date::strftime(get_string('strftimerecentfull', 'langconfig'), $timestamp);
if (empty($timestamp)) {
return '';
} else {
return \core_date::strftime(get_string('strftimerecentfull', 'langconfig'), $timestamp);
}
}
/**