| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
i still want paying
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,713
|
php notices (undefined variables)
getting loads of notices regarding undefined variables, and i have been doing this to get rid: PHP Code:
just wondered if this was the correct way? (variables are coming from url strings and cannot be set in the code) |
|
|
|
|
|
#4 (permalink) | |
|
Everything is fine.
|
Quote:
- Mike |
|
|
|
|
#6 (permalink) |
|
<insert clever title>
|
.
Just offering a simple solution. Obviously it's best to fix the problem BUT if he's got a simple site and incorporates an older script and the only errors he gets is a bunch of undefined variables technically there's no harm with turning those errors off. It's important to understand how PHP's built in error reporting works anyways - I'd never let a client site go live fully opened up as naturally there may be a bump or 2 in the road. Build a custom error_log scheme and that will let you know whats wrong and not make your client look like an amature. |
|
|
|
#8 (permalink) |
|
Registered User
Join Date: Sep 2006
Location: Calgary
Posts: 7
|
Just to clarify... the reports you are getting about undefined variables are "NOTICES"... which is the lowest level of reports. They are "things that you oughtta know", but they don't really have any impact on your script. You can change the specified reporting level to not display NOTICE reports, but still report "warnings" and "errors". This will get rid of these not so important messages, but will still help you when you have real problems. -Ryan |
|
![]() |