我试图在我的Cakephp设置中使用SmartyView。我去了这个班级:http://bakery.cakephp.org/articles/icedcheese/2008/01/14/smarty-view-for-1-2
但是在执行时,我收到了这个错误:
注意(8):间接修改重载属性SmartyView :: $ Smarty无效[APP / views / smarty.php,第58行]
致命错误:无法通过引用分配重载对象
对于这一行: 父:: __构建体($控制器); $ this-> Smarty =& new Smarty();
有没有其他人遇到这个/知道该怎么办?谢谢!
答案 0 :(得分:1)
嗯,你不能pass arguments to magic methods by reference。
变化:
$this->Smarty = &new Smarty();
为:
$this->Smarty = new Smarty();