* commonModel: fix error the program won't exit if the checkNewEntry method return false.

This commit is contained in:
liugang
2024-04-08 15:03:59 +08:00
parent 46f40ac116
commit 800b12bcdb
+5 -1
View File
@@ -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');