Fwd: Re: Bug #12554 Updated: switch() bug

From: Date: Fri, 03 Aug 2001 16:04:11 +0000
Subject: Fwd: Re: Bug #12554 Updated: switch() bug
Groups: php.dev 
Request: Send a blank email to php-dev+get-61982@lists.php.net to get a copy of this message
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" <lee@mediawaveonline.com> 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 lee@mediawaveonline.com ----- Original Message ----- From: "Bug Database" <php-dev@lists.php.net> To: <lee@mediawaveonline.com> Sent: Friday, August 03, 2001 8:42 AM Subject: Bug #12554 Updated: switch() bug > ID: 12554 > Updated by: andy > Reported By: lee@mediawaveonline.com > 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] lee@mediawaveonline.com > > <? > 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 > lee@mediawaveonline.com > > > > ------------------------------------------------------------------------ > > > > ATTENTION! Do NOT reply to this email! > To reply, use the web interface found at http://bugs.php.net/?id=12554&edit=2 > -------------------------------------------------------

« previous php.dev (#61982) next »