From 1404ede20a8c352f0d9b1cc67eaf2f4022be38d4 Mon Sep 17 00:00:00 2001 From: vendeeglobe <54716082+vendeeglobe@users.noreply.github.com> Date: Sun, 8 May 2022 14:10:46 +0200 Subject: [PATCH] minor fixes Passing null to parameter #1 ($string) of type string is deprecated --- wacko/handler/page/addcomment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wacko/handler/page/addcomment.php b/wacko/handler/page/addcomment.php index 98452b4f2..43097a08d 100644 --- a/wacko/handler/page/addcomment.php +++ b/wacko/handler/page/addcomment.php @@ -7,9 +7,9 @@ if ($this->has_access('comment') && $this->has_access('read')) { - $body = str_replace("\r", '', rtrim(($_POST['body'] ?? null))); + $body = str_replace("\r", '', rtrim(($_POST['body'] ?? ''))); $error = ''; - $title = trim(($_POST['title'] ?? null)); + $title = trim(($_POST['title'] ?? '')); $parent_id = (int) ($_POST['parent_id'] ?? 0); $watchpage = (int) ($_POST['watchpage'] ?? 0); $noid_publication = (int) ($_POST['noid_publication'] ?? 0);