|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mlaco Smarty n00b
Joined: 11 May 2003 Posts: 4
|
Posted: Sun May 11, 2003 3:27 pm Post subject: invalid reference error |
|
|
I used to use {$smarty.session.cart->getXY()} with Smarty 2.4.0 and 2.4.2, which is not possible in Smarty 2.5.0.
Invalid reference error is triggered in Smarty_Compiler.class.php in method _compile_smarty_ref(&$indexes).
A quick and dirty solution is to comment out the line starting with "$this->_syntax_error"
marek laco. |
|
Back to top |
|
Wom.bat Smarty Pro
Joined: 24 Apr 2003 Posts: 107 Location: Munich, Germany
|
Posted: Sun May 11, 2003 3:29 pm Post subject: |
|
|
this has to do with the way objects are referenced in 2.5.0
do a manual assign on $_SESSION to get around this |
|
Back to top |
|
mlaco Smarty n00b
Joined: 11 May 2003 Posts: 4
|
Posted: Tue May 13, 2003 8:37 pm Post subject: |
|
|
Do you have any idea if this behaviour will change in later versions? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed May 14, 2003 12:27 am Post subject: |
|
|
I haven't tried, but couldn't you assign an intermediate to $smarty.session.cart (say $cart) and then do a $cart->getxy() ? Or is that crazy talk? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|