Skip to content

Commit 7c5028c

Browse files
committed
fix: routes action parameter null handled
1 parent 2803b0c commit 7c5028c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/Core/Util/Route.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static function post($hook, $invokeable)
2626

2727
public static function request($method, $hook, $invokeable)
2828
{
29-
$action = $_REQUEST['action'] ?? $_POST['action'] ?? $_GET['action'];
29+
$action = $_REQUEST['action'] ?? $_POST['action'] ?? $_GET['action'] ?? null;
3030
$action = sanitize_text_field($action);
3131

3232
if (
@@ -63,7 +63,7 @@ public static function request($method, $hook, $invokeable)
6363

6464
public static function action()
6565
{
66-
$action = $_REQUEST['action'] ?? $_POST['action'] ?? $_GET['action'];
66+
$action = $_REQUEST['action'] ?? $_POST['action'] ?? $_GET['action'] ?? null;
6767
$action = sanitize_text_field($action);
6868

6969
$sanitizedMethod = sanitize_text_field($_SERVER['REQUEST_METHOD']);

0 commit comments

Comments
 (0)