Author: Derick Rethans (derickr) Date: 2026-01-21T15:15:56Z Commit: https://github.com/php/web-php/commit/9dc93f66aef303930ce6ba3c2a19546d013a1c6a Raw diff: https://github.com/php/web-php/commit/9dc93f66aef303930ce6ba3c2a19546d013a1c6a.diff
Fall back to 'published' date is 'updated' is not available (and fix entry) Changed paths: M archive/entries/2018-06-06-1.xml M conferences/index.php Diff: diff --git a/archive/entries/2018-06-06-1.xml b/archive/entries/2018-06-06-1.xml index 1dfba02c19..39e06a8840 100644 --- a/archive/entries/2018-06-06-1.xml +++ b/archive/entries/2018-06-06-1.xml @@ -3,7 +3,7 @@ <title>Southeast PHP Conference</title> <id>http://php.net/archive/2018.php#id2018-06-06-1</id> <published>2018-06-06T11:02:22+00:00</published> - <published>2018-06-06T11:02:22+00:00</published> + <updated>2018-06-06T11:02:22+00:00</updated> <default:finalTeaserDate xmlns="http://php.net/ns/news">2018-06-06</default:finalTeaserDate> <category term="conferences" label="Conference announcement"/> <link href="http://php.net/conferences/index.php#id2018-06-06-1" rel="alternate" type="text/html"/> diff --git a/conferences/index.php b/conferences/index.php index a61cd2acf4..f279da7f07 100644 --- a/conferences/index.php +++ b/conferences/index.php @@ -18,7 +18,7 @@ foreach ((new NewsHandler())->getConferences() as $entry) { $link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '', $entry["id"]); $id = parse_url($entry["id"], PHP_URL_FRAGMENT); - $date = date_format(date_create($entry["updated"]), 'Y-m-d'); + $date = date_format(date_create($entry["updated"] ?? $entry["published"]), 'Y-m-d'); $content .= '<div class="newsentry">'; $content .= '<h3 class="newstitle title"><a href="' . $MYSITE . $link . '" id="' . $id . '">' . $entry["title"] . '</a></h3>'; $content .= '<div class="newsimage">';
