Re: Fwd: Re: mixing of asign() and assign_by_ref() overwrites external vars

boots <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
--- Sebastian Mendel <[email protected]> wrote:
> Boots schrieb:
> 
> >>$testvar = true;
> >>$smarty = new Smarty;
> >>
> >>$smarty->assign_by_ref('testvar', $testvar);
> >>
> >>// bug?
> >>var_dump($testvar);  // prints: (bool) true
> >>$smarty->assign('testvar', false);
> >>var_dump($testvar);  // prints: (bool) false
> >
> >What do you think should happen? You are changing a by-reference
> >value
> 
> i expect if i use appand() that the reference is unset by smarty,
> cause 
> i dont think that any body wants to set an external var this way!

I suspect you don't really want to use append_by_ref then.

xo boots


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.