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

This commit is contained in:
Melanie Treitinger
2023-02-08 11:19:27 +01:00
parent cb6dc699b8
commit ab619ae38d
@@ -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);
}
}
/**