Skip to content

Commit 70699eb

Browse files
author
Mark Randall
committed
No news changes if there isn't a link.
1 parent 443d413 commit 70699eb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

include/layout.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,9 @@ function get_news_changes()
557557

558558
$date->modify("+1 week");
559559
if ($date->getTimestamp() > $_SERVER["REQUEST_TIME"]) {
560-
assert(isset($lastNews["link"][0]["href"]));
560+
if (!isset($lastNews["link"][0]["href"])) {
561+
return false;
562+
}
561563

562564
$link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '/', $lastNews["link"][0]["href"]);
563565
$title = $lastNews["title"];

0 commit comments

Comments
 (0)