From 652ffa2d4f1900ceaab7edf9bf00611702cad323 Mon Sep 17 00:00:00 2001 From: Silverhand <30499443+silverhand7@users.noreply.github.com> Date: Fri, 8 Dec 2023 23:41:14 +0800 Subject: [PATCH] Check if the $url in the action button class has ended with / --- src/Screen/Actions/Button.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Screen/Actions/Button.php b/src/Screen/Actions/Button.php index 26db6ee40..5b7e028ea 100644 --- a/src/Screen/Actions/Button.php +++ b/src/Screen/Actions/Button.php @@ -78,7 +78,7 @@ public function __construct() $query = http_build_query($this->get('parameters')); - $action = rtrim("{$url}/{$this->get('method')}?{$query}", '/?'); + $action = rtrim((str_ends_with($url, '/') ? $url : "{$url}/") . "{$this->get('method')}?{$query}", '/?'); $this->set('action', $action); })->addBeforeRender(function () { $action = $this->get('action');