Re: Re[2]: [SMARTY] Warning in Smarty 2.3.0

From: Date: Thu, 28 Nov 2002 13:46:00 +0000
Subject: Re: Re[2]: [SMARTY] Warning in Smarty 2.3.0
References: 1 2 3 4  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6597@lists.php.net to get a copy of this message
some purists may consider using a variable before initialising it to be buggy code. I tend to run error reporting = ALL on my development server simply to try and pick them up, as it's not too much of a hardship to make sure you've initiated all your variables. Also for dyslexics like me it does prevent the old miss typing of variable names. (although $A is quite hard to miss type :) Nick(c) G> I disagree .. you can get a warning, but simply not setting a variable G> before a reference is made to it.. G> G> so something like G> if ($A == '1'){ G> do this G> } G> G> will generate a warning, unless $A is initiated earlier in the script. > MP> At 12:22 2002-11-27 -0500, you wrote: > >>If you have error reporting set to all, you will receive a ton of > >>warnings .. even if they aren't really problems .. so set your > >>reporting to not include warnings. > > MP> Yuo only get warnings when the code is buggy. A better solution is to code > MP> properly.

« previous php.smarty.general (#6597) next »