我最近在Joomla的网站上安装了Zoo组件,每当我尝试更改任何设置或添加/显示任何新对象时,此消息都会一直显示:
致命错误:带有消息的未捕获异常'ReflectionException' 'Class ItemRenderer没有构造函数,因此无法传递 任何构造函数参数' /home/monashah/public_html/ar/administrator/components/com_zoo/framework/helpers/object.php:34 堆栈跟踪:#0 /home/monashah/public_html/ar/administrator/components/com_zoo/framework/helpers/object.php(34): ReflectionClass-> newInstanceArgs(Array)#1 /home/monashah/public_html/ar/administrator/components/com_zoo/helpers/renderer.php(49): ObjectHelper-> create('itemRenderer',Array)#2 /home/monashah/public_html/ar/administrator/components/com_zoo/views/manager/tmpl/types.php(66): RendererHelper-> create('item')#3 /home/monashah/public_html/ar/libraries/joomla/application/component/view.php(649): include('/ home / monashah / ...')#4 /home/monashah/public_html/ar/libraries/joomla/application/component/view.php(205): JView-> loadTemplate(NULL)#5 /home/monashah/public_html/ar/administrator/components/com_zoo/controllers/manager.php(190): JView-> display()#6 / home / monas in 第34行/home/monashah/public_html/ar/administrator/components/com_zoo/framework/helpers/object.php
导致此问题的Object.php中的代码是:
public function create($class, $args = array()) {
// load class
$this->app->loader->register($class, 'classes:'.strtolower($class).'.php');
// use reflection or new for object creation
if (count($args) > 0) {
$reflection = new ReflectionClass($class);
$object = $reflection->newInstanceArgs($args);
} else {
$object = new $class();
}
// add reference to related app instance
if (property_exists($object, 'app')) {
$object->app = $this->app;
}
return $object;
}
}
请帮我解决这个问题。