From abec7c49bef6162eef78a073c4e64edddd727c37 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 3 Jun 2024 15:48:15 +0200 Subject: [PATCH] mvc:request - allow mixed for $defaultValue so we can pass strings or arrays --- src/opnsense/mvc/app/library/OPNsense/Mvc/Request.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opnsense/mvc/app/library/OPNsense/Mvc/Request.php b/src/opnsense/mvc/app/library/OPNsense/Mvc/Request.php index c7e8bd9b4..3a20159ef 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Mvc/Request.php +++ b/src/opnsense/mvc/app/library/OPNsense/Mvc/Request.php @@ -111,7 +111,7 @@ class Request return isset($_POST[$name]); } - public function getPost(?string $name = null, ?string $filter = null, ?string $defaultValue = null) + public function getPost(?string $name = null, ?string $filter = null, mixed $defaultValue = null) { if ($name === null) { $value = $_POST; @@ -124,7 +124,7 @@ class Request return $value; } - public function get(?string $name = null, ?string $filter = null, ?string $defaultValue = null) + public function get(?string $name = null, ?string $filter = null, mixed $defaultValue = null) { if ($name === null) { $value = $_REQUEST;