Does anyone have any opinions about this (and the bug) http://php.net/bugs.php?id=12554 ---------- Forwarded Message ---------- Subject: Re: Bug #12554 Updated: switch() bug Date: Fri, 3 Aug 2001 09:09:41 -0700 From: "Chris Lee" <[EMAIL PROTECTED]> explain more. sure its a 'feature change request' but not a bug ? this was intentionally programmed like this ? to give an error on the 'case' lines vs the line where $var_name is accually used ? I feel its a bug and this could not have been intentional, but its just an opinion. I would like to see this 'feature' changed, in my opinion its not much of a feature. haha. reminds me of an old MS joke. "its not a bug, its a feature" windows has so many memory leaks that it is advised to reboot your computer once a day or more as needed, so we included this automated feature for you, we will automatically reboot your computer when the memory leaks get to large. haha :) oh well. what do you think ? am I nuts for thinking the error handeling should be changed for this case ? Chris Lee [EMAIL PROTECTED] ----- Original Message ----- From: "Bug Database" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 03, 2001 8:42 AM Subject: Bug #12554 Updated: switch() bug > ID: 12554 > Updated by: andy > Reported By: [EMAIL PROTECTED] > Status: Open > Old Bug Type: Scripting Engine problem > Bug Type: Feature/Change Request > Operating System: linux > PHP Version: 4.0.6 > New Comment: > > reclassified (This is not a "bug") > > Previous Comments: > ------------------------------------------------------------------------ > > [2001-08-03 10:15:28] [EMAIL PROTECTED] > > <? > switch($search) > { > case 'date': > echo 'date'; > break; > case 'people': > echo 'people'; > break; > case 'keyword': > echo 'keyword'; > break; > default: > echo 'default'; > break; > } > ?> > > Warning: Undefined variable: search in > /home/httpd/vhosts/mediawaveonline/test2.php on line 4 > Warning: Undefined variable: search in > /home/httpd/vhosts/mediawaveonline/test2.php on line 7 > Warning: Undefined variable: search in > /home/httpd/vhosts/mediawaveonline/test2.php on line 10 > > if you ask me, I should get a warning on line 2 where the switch is, not on > 4, 7, 10 where the case statements are. > > php 4.0.5 cgi does not do this. > > Chris Lee > [EMAIL PROTECTED] > > > > ------------------------------------------------------------------------ > > > > ATTENTION! Do NOT reply to this email! > To reply, use the web interface found at http://bugs.php.net/?id=12554&edit=2 > ------------------------------------------------------- -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]