From 800b12bcdb9c36695308cbdf3a6512f41f8ddff6 Mon Sep 17 00:00:00 2001 From: liugang Date: Mon, 8 Apr 2024 15:03:59 +0800 Subject: [PATCH] * commonModel: fix error the program won't exit if the checkNewEntry method return false. --- module/common/model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/common/model.php b/module/common/model.php index 0d6ffa1dc4..f61b39e111 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1595,7 +1595,11 @@ class commonModel extends model public function checkEntry() { /* if the API is new version, goto checkNewEntry. */ - if($this->app->version) return $this->checkNewEntry(); + if($this->app->version) + { + if(!$this->checkNewEntry()) $this->response('INVALID_TOKEN'); + return true; + } /* Old version. */ if(!isset($_GET[$this->config->moduleVar]) or !isset($_GET[$this->config->methodVar])) $this->response('EMPTY_ENTRY');