FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Eregi possible problem
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Eregi possible problem [message #169358 is a reply to message #169357] Wed, 08 September 2010 12:55 Go to previous messageGo to previous message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma:
Senior Member
El 08/09/2010 14:12, GarryJones escribió/wrote:
>>> What errors would not be a problem?
> Some errors, such as the one above just confuse users. If the code is
> still working its nothing they need to worry about.

Exactly. That's why the recommended setting for "display_errors" in
production environments is "Off":

http://es.php.net/manual/en/errorfunc.configuration.php#ini.display-errors


> Another common claimed "error" that is not an error: I use "post" to
> read in values from a form. According to what the user clicks on in
> the first form I show a different number of checkboxes in the second
> form. But to make things easier I still check for all checkbox values
> each time the code runs, its easier to run the entire code so I dont
> miss something. But useing post on a 'varname' from a checkbox that
> has not been displayed leads to the undefined index error message. Its
> not an error, I don't care that I am checking for something that is
> not there. But users who see error messages get worried.

Actually, you don't get an error, you get a _notice_. PHP tells you that
you are trying to read a value from an array that does not exist. That's
a very useful piece of info for you as developer. Notices help you to
identify potential bugs.

You're free to configure your environment so it doesn't trigger any sort
of error, warning or notice[1], but it won't make your coding task
easier. On the contrary, it'll make it harder in the long term. Trust me :)

[1] http://es.php.net/manual/en/function.error-reporting.php



--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Another heredoc question
Next Topic: php filling in listbox value based on db record ??
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 05:53:52 GMT 2024

Total time taken to generate the page: 0.13553 seconds