Re: Newbie dummy questions..... error messages

From: Date: Fri, 16 Feb 2001 00:14:51 +0000
Subject: Re: Newbie dummy questions..... error messages
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40029@lists.php.net to get a copy of this message
> I get the following on one of my pages, > > Warning: Use of undefined constant month - assumed 'month' in > > This site ran error free before, only after adding "Phorum" > > if ($brand == 'nut') { > > if (isset($brand)) { > if ($brand == 'nut') { > $item = "Chris King 2nut Headset"; > } > } Maybe easier to type: if (isset($brand) && $brand == 'nut'){ $item = "Chris King 2nut Headset"; } Phorum must be altering your error_reporting() and not setting it back to its original value. Bad! You can suppress those messages using error_reporting(7) right after you include the Phorum stuff. [7? It used to be 7. Now there's a whole bunch more flags, and I dunno what the numbers mean any more...] Maybe error_reporting(E_ALL^E_NOTICE) or something like that... Anyway, read up on error_reporting. You may find that it's better, though, to change your php.ini file and get these warnings all over the place -- You'll find typos in your variable names easier, for one thing. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#40029) next »