[PHP-WEBMASTER] [web-php] master: Fall back to 'published' date is 'updated' is not available (and fix entry)

Author: Derick Rethans (derickr)
Date: 2026-01-21T15:15:56Z

Commit: Fall back to 'published' date is 'updated' is not available (and fix … · php/web-php@9dc93f6 · GitHub
Raw diff: Southeast PHP Conference

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>PHP: News Archive - 2018;
   <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&quot;&gt;2018\-06\-06&lt;/default:finalTeaserDate&gt;
   <category term="conferences" label="Conference announcement"/>
   <link href="PHP: PHP Conferences around the world; 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">';