From 83cf9f8aa5dd25944ce77283e4fb0880e8d36547 Mon Sep 17 00:00:00 2001 From: Guan Xiying Date: Thu, 20 Oct 2022 10:21:13 +0800 Subject: [PATCH] * Fix bug called a object by the loadModel function in another module. --- framework/model.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/model.class.php b/framework/model.class.php index b0f1205b23..8b967734f5 100644 --- a/framework/model.class.php +++ b/framework/model.class.php @@ -31,7 +31,7 @@ class model extends baseModel { parent::__construct($appName); - $moduleName = $this->app->getModuleName(); + $moduleName = $this->getModuleName(); $this->loadModel($moduleName, $appName, 'tao'); } @@ -348,7 +348,7 @@ class model extends baseModel */ public function __call($method, $arguments) { - $moduleName = $this->app->getModuleName(); + $moduleName = $this->getModuleName(); $taoClass = $moduleName . 'Tao'; if(!is_callable(array($this->{$taoClass}, $method))) $this->app->triggerError("the module {$moduleName} has no {$method} method", __FILE__, __LINE__, $exit = true);