Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Error when accessing class contants from object

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Lemon Juice
Smarty Pro


Joined: 24 May 2006
Posts: 109

PostPosted: Sat Oct 25, 2014 9:28 pm    Post subject: Error when accessing class contants from object Reply with quote

I have a need to access class constants from an object like this:
Code:
{$object::CONST}

I have found an old discussion at
Code:
https://groups.google.com/forum/#!msg/smarty-developers/-WepDnLrCPo/eipMQPA86yEJ

(sorry, this forum can't handle links with exclamation marks...)
according to which this should be supported. However, Smarty rev.4901 gives me this error:

Code:
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting ',' or ';' in D:\www\myproject\lib\smarty\sysplugins\smarty_internal_templatebase.php(171) : eval()'d code on line 223


Moreover, after I get this error Smarty loses track of changes in my template and I have to delete compiled templates in order for Smarty to pick up any further changes (with compile check set to on, of course).

Is this some regression bug? I've never used this before so I don't know if I should expect it to work or not.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Thu Oct 30, 2014 12:00 am    Post subject: Reply with quote

This bug is now fixed in the github trunk at https://github.com/smarty-php/smarty
Back to top
View user's profile Send private message
Lemon Juice
Smarty Pro


Joined: 24 May 2006
Posts: 109

PostPosted: Thu Oct 30, 2014 8:19 am    Post subject: Reply with quote

Many thanks, it works now!

BTW, are you moving to git with your project?
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP