Notices..your opinions
Posted: Tue May 27, 2008 6:58 am
The lead dev where I work wants all sites to work at error_reporting e_all without any errors which includes notices.
I find this annoying as I am having to wrap loads of things in if statements all the time.
for example
if $cat->age isn't set this will throw up a notice
so i'm having to do something like this
is this a case of being being a bad coder and trying to access values of unset variables or so you think notices are overkill?
I find this annoying as I am having to wrap loads of things in if statements all the time.
for example
if $cat->age isn't set this will throw up a notice
Code: Select all
if($cat->age > 10)
{
print "old cat";
}
Code: Select all
if(isset($age->age)){
if($cat->age > 10)
{
print "old cat";
}
}