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]>
oops, forgot to include the list :)

--- boots <[email protected]> wrote:
> Date: Fri, 4 Jun 2004 06:42:41 -0700 (PDT)
> From: boots <[email protected]>
> Subject: Re: [SMARTY-DEV] mixing of asign() and assign_by_ref()
> overwrites external vars
> To: Sebastian Mendel <[email protected]>
> 
> --- Sebastian Mendel <[email protected]> wrote:
> > $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
> after all. Try unsetting the reference first.
> 
> 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.