* framework: check the property before calling it.

This commit is contained in:
liugang
2024-02-20 16:20:55 +08:00
parent a945f9e78c
commit f144b7df18
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -334,7 +334,7 @@ class model extends baseModel
$moduleName = $this->getModuleName();
$taoClass = $moduleName . 'Tao';
if(is_callable(array($this->{$taoClass}, $method))) return call_user_func_array(array($this->{$taoClass}, $method), $arguments);
if(isset($this->{$taoClass}) && is_callable(array($this->{$taoClass}, $method))) return call_user_func_array(array($this->{$taoClass}, $method), $arguments);
$this->app->triggerError("the module {$moduleName} has no {$method} method", __FILE__, __LINE__, true);
}