From 984dec37e21f83a1b98a488eb27cfd99040eb90b Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Wed, 16 Oct 2024 12:36:38 +0900 Subject: [PATCH] Bug fix for Admin\Backend ->action var access --- src/Admin/Backend.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Admin/Backend.php b/src/Admin/Backend.php index d35ccdc..e660663 100644 --- a/src/Admin/Backend.php +++ b/src/Admin/Backend.php @@ -172,7 +172,7 @@ class Backend } // queue key - if (preg_match("/^(add|save|delete|remove|move|up|down|push_live)$/", $this->action)) { + if (preg_match("/^(add|save|delete|remove|move|up|down|push_live)$/", $this->action ?? '')) { $this->queue_key = \CoreLibs\Create\RandomKey::randomKeyGen(3); } } @@ -282,14 +282,14 @@ class Backend "NULL" : "'" . $this->session->getSessionId() . "'") . ", " - . "'" . $this->db->dbEscapeString($this->action) . "', " - . "'" . $this->db->dbEscapeString($this->action_id) . "', " - . "'" . $this->db->dbEscapeString($this->action_yes) . "', " - . "'" . $this->db->dbEscapeString($this->action_flag) . "', " - . "'" . $this->db->dbEscapeString($this->action_menu) . "', " - . "'" . $this->db->dbEscapeString($this->action_loaded) . "', " - . "'" . $this->db->dbEscapeString($this->action_value) . "', " - . "'" . $this->db->dbEscapeString($this->action_error) . "')"; + . "'" . $this->db->dbEscapeString($this->action ?? '') . "', " + . "'" . $this->db->dbEscapeString($this->action_id ?? '') . "', " + . "'" . $this->db->dbEscapeString($this->action_yes ?? '') . "', " + . "'" . $this->db->dbEscapeString($this->action_flag ?? '') . "', " + . "'" . $this->db->dbEscapeString($this->action_menu ?? '') . "', " + . "'" . $this->db->dbEscapeString($this->action_loaded ?? '') . "', " + . "'" . $this->db->dbEscapeString($this->action_value ?? '') . "', " + . "'" . $this->db->dbEscapeString($this->action_error ?? '') . "')"; $this->db->dbExec($q, 'NULL'); }