From 914fe44e69cd7bd68606b6925c7822909f04ab9a Mon Sep 17 00:00:00 2001 From: Giam Teck Choon Date: Tue, 27 Aug 2024 21:53:34 +0800 Subject: [PATCH 7/9] edit.php - Declare $form['forwards'] as array. This is needed to fix the following error: PHP Fatal error: Uncaught TypeError: join(): Argument #1 ($pieces) must be of type array, string given in edit.php:29 Signed-off-by: Giam Teck Choon --- edit.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/edit.php b/edit.php index 5a9f1a4..d5ceff1 100644 --- a/edit.php +++ b/edit.php @@ -26,6 +26,9 @@ if($_GET['key'] == '') { data returned from session has higher priority */ $form = $vm->user_info($_GET['username']); +if(!isset($form['forwards'])) { + $form['forwards'] = []; +} $form['forwards'] = @join("\n", $form['forwards']); if($form['expiry'] != '-') { -- 2.34.1