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

Is changed $tag_arg format for Compiler plugin?

 
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 -> Smarty 3
View previous topic :: View next topic  
Author Message
Bon/V
Smarty Rookie


Joined: 25 Feb 2011
Posts: 7

PostPosted: Fri Feb 25, 2011 2:14 pm    Post subject: Is changed $tag_arg format for Compiler plugin? Reply with quote

About $tag_arg format for Compiler plugin.
Is it changed a spec?

eg.
{myplugin arg1 arg2}

function smarty_compiler_myplugin($tag_arg, &$o_Smarty) {
// $tag_arg:
// Till 2.6.26: get "arg1 arg2"
// Till 3.0.6 : get array(arg1, arg2}
// Now 3.0.7: cannot get...
}

If {myplugin a=arg1 b=arg2},
I can get array('a'=>'arg1', 'b'=>'arg2').
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Fri Feb 25, 2011 4:24 pm    Post subject: Reply with quote

This was a bug which is now fixed in the SVN trunk version.

If you pass unnamed attributs like in your {myplugin arg1 arg2} example you will now get array(arg1, arg2) as in the earlier Smarty3 releases.
Back to top
View user's profile Send private message
Bon/V
Smarty Rookie


Joined: 25 Feb 2011
Posts: 7

PostPosted: Fri Feb 25, 2011 11:51 pm    Post subject: Reply with quote

Thank you for your immediate reply!
It worked on SVN Rev.4023.

I will check SVN earlier from now on.
Back to top
View user's profile Send private message
Bon/V
Smarty Rookie


Joined: 25 Feb 2011
Posts: 7

PostPosted: Sun Sep 18, 2011 12:58 pm    Post subject: Reply with quote

This issue recurred.

{myplugin arg1 arg2}

function smarty_compiler_myplugin($tag_arg, &$o_Smarty) {
// $tag_arg:
// 3.0.8 : get array(arg1, arg2}
// 3.1.0: cannot get...
}

At 3.1.0:
If {myplugin a=arg1 b=arg2},
I can get array('a'=>'arg1', 'b'=>'arg2').
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sun Sep 18, 2011 6:38 pm    Post subject: Reply with quote

For some reasion this change was not included in 3.1.

It's now in the SVN trunk
Back to top
View user's profile Send private message
Bon/V
Smarty Rookie


Joined: 25 Feb 2011
Posts: 7

PostPosted: Mon Sep 19, 2011 12:56 am    Post subject: Reply with quote

Thank you for your immediate reply!
It worked on SVN Rev.4288.
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 -> Smarty 3 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