[web-php] preview: No news changes if there isn't a link.

From: Date: Wed, 24 Jun 2026 08:48:54 +0000
Subject: [web-php] preview: No news changes if there isn't a link.
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-33817@lists.php.net to get a copy of this message
Author: Mark Randall Committer: Derick Rethans (derickr) Date: 2026-06-24T09:48:49+01:00 Commit: https://github.com/php/web-php/commit/18956bb65f8f7570fd4ec2357fa64fa0a0f1fddb Raw diff: https://github.com/php/web-php/commit/18956bb65f8f7570fd4ec2357fa64fa0a0f1fddb.diff No news changes if there isn't a link. Changed paths: M include/layout.inc Diff: diff --git a/include/layout.inc b/include/layout.inc index 857128d64c..99adf24829 100644 --- a/include/layout.inc +++ b/include/layout.inc @@ -557,7 +557,9 @@ function get_news_changes() $date->modify("+1 week"); if ($date->getTimestamp() > $_SERVER["REQUEST_TIME"]) { - assert(isset($lastNews["link"][0]["href"])); + if (!isset($lastNews["link"][0]["href"])) { + return false; + } $link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '/', $lastNews["link"][0]["href"]); $title = $lastNews["title"];

« previous php.webmaster (#33817) next »