开发者

CakePHP and Smarty Problems

I am trying to use SmartyView with my Cakephp setup. I went here and used this 开发者_StackOverflowclass: http://bakery.cakephp.org/articles/icedcheese/2008/01/14/smarty-view-for-1-2

But on execution, I get this error:

Notice (8): Indirect modification of overloaded property SmartyView::$Smarty has no effect [APP/views/smarty.php, line 58]

Fatal error: Cannot assign by reference to overloaded object

For this line: parent::__construct($controller); $this->Smarty = &new Smarty();

Has anyone else run into this/know what to do? Thanks!


Well, you can't pass arguments to magic methods by reference.

Change:

$this->Smarty = &new Smarty();

to:

$this->Smarty = new Smarty();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜