* zin: fix createWg with function wg not work

This commit is contained in:
Hao Sun
2023-02-27 15:05:22 +08:00
parent 4ed0145297
commit d5b589103f
+2 -2
View File
@@ -49,10 +49,10 @@ function createWg($name, $args)
$wgName = "\\zin\\$name";
if(method_exists($wgName, 'create'))
if(function_exists($wgName))
{
return call_user_func_array($wgName, $args);
}
return class_exists($wgName) ? (new $wgName($args)) : $apiName($args);
return class_exists($wgName) ? (new $wgName($args)) : $wgName($args);
}