Fwd: Re: [SMARTY-DEV] mixing of asign() and assign_by_ref() overwrites external vars

From: Date: Fri, 04 Jun 2004 13:43:34 +0000
Subject: Fwd: Re: [SMARTY-DEV] mixing of asign() and assign_by_ref() overwrites external vars
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2387@lists.php.net to get a copy of this message
oops, forgot to include the list :) --- boots <jayboots@yahoo.com> wrote: > Date: Fri, 4 Jun 2004 06:42:41 -0700 (PDT) > From: boots <jayboots@yahoo.com> > Subject: Re: [SMARTY-DEV] mixing of asign() and assign_by_ref() > overwrites external vars > To: Sebastian Mendel <lists@sebastianmendel.de> > > --- Sebastian Mendel <lists@sebastianmendel.de> 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/

« previous php.smarty.dev (#2387) next »