开发者

CakePHP and Smarty Problems

开发者 https://www.devze.com 2023-03-23 11:42 出处:网络
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

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

精彩评论

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