PHP 4.0 Bug #9881 Updated: Varibles are not defined

From: Date: Tue, 20 Mar 2001 20:12:44 +0000
Subject: PHP 4.0 Bug #9881 Updated: Varibles are not defined
Groups: php.dev 
Request: Send a blank email to php-dev+get-49552@lists.php.net to get a copy of this message
ID: 9881 Updated by: hholzgra Reported By: echoz@k-designs.com.sg Status: Bogus Bug Type: Variables related Assigned To: Comments: because you are using $e in the switch statement although it has never been given a value before if this annoies you turn of E_NOTICE warning level or wrap your switch into if(isset($e)) { ... } Previous Comments: --------------------------------------------------------------------------- [2001-03-20 15:12:08] torben@php.net Well, define $e then. ;) Or put a '@' in front of it to suppress the error. Or turn down the error_reporting(). Check the manual for more information on using the language: http://www.php.net/manual And especially the section on error handling: http://www.php.net/manual/en/features.error-handling.php --------------------------------------------------------------------------- [2001-03-20 15:11:05] derick@php.net Read www.php.net/error_reporting please, this is not a bug --------------------------------------------------------------------------- [2001-03-20 14:56:11] echoz@k-designs.com.sg <?php switch ($e) { case "list"; // do this break; case "add"; // do that break; } ?> everytime i call the script without the varible "e" specified... they will return "Warning: Undefined variable: e in e:somewheresomehow on line 14" please help. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9881&edit=2

« previous php.dev (#49552) next »