From 801b58dafc2722ee8d8959649e6a1b77b28bf53e Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 20 Nov 2018 11:13:24 +0100 Subject: [PATCH] nieuws: ignore missing title during edit Silence fgets() warning for new articles since commit v3.7-8-gc2423a9cb3 (2018-10-27) [nieuws: prepend article header to page title]. --- nieuws/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nieuws/index.php b/nieuws/index.php index d56758e..cf63a63 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -11,7 +11,7 @@ if (!empty($User['admin'])) { if ($page and !is_numeric($page)) { $edit = !empty($User['admin']) ? htmlspecialchars(@$_GET['edit']) : NULL; $article = new ArchiveArticle("$Page$Args.html"); - $Place['title'] = $article->title; + $Place['title'] = $edit ?: $article->title; $Place[1] = ' '.$article->date.''; print preg_replace('{(?<=

)(.*?)(?=

)}', ($edit ?: '\1').' [[1]]', ob_get_clean()); if ($article->file and $article->image) { -- 2.30.0