Re: [PHP] Avoiding NOTICEs on Array References

2005-01-26 Thread Jason Barnett
[EMAIL PROTECTED] wrote: On 26 Jan 2005 Jennifer Goodie wrote: if (isset($fields['flags']['someflag']) && $fields['flags']['someflag']) if (isset($_POST['checkboxfieldname']) && $_POST['checkboxfieldname']) The && short-circuits, so the second part of the conditional only gets evaluated if the

Re: [PHP] Avoiding NOTICEs on Array References

2005-01-26 Thread trlists
On 26 Jan 2005 Jennifer Goodie wrote: > if (isset($fields['flags']['someflag']) && $fields['flags']['someflag']) > if (isset($_POST['checkboxfieldname']) && $_POST['checkboxfieldname']) > > The && short-circuits, so the second part of the conditional only > gets evaluated if the first part is t

Re: [PHP] Avoiding NOTICEs on Array References

2005-01-26 Thread Jochem Maas
Tom Rawson wrote: I have many places where I use references like this: if ($fields['flags']['someflag']) ... or perhaps if ($_POST['checkboxfieldname']) ... If there is no value for 'someflag', or if the check box was not checked -- both of which are often the case -- these generat

Re: [PHP] Avoiding NOTICEs on Array References

2005-01-26 Thread Jennifer Goodie
-- Original message -- From: "Tom Rawson" <[EMAIL PROTECTED]> > I have many places where I use references like this: > > if ($fields['flags']['someflag']) ... > > or perhaps > > if ($_POST['checkboxfieldname']) ... > > If there is no value for 'somef

[PHP] Avoiding NOTICEs on Array References

2005-01-26 Thread Tom Rawson
I have many places where I use references like this: if ($fields['flags']['someflag']) ... or perhaps if ($_POST['checkboxfieldname']) ... If there is no value for 'someflag', or if the check box was not checked -- both of which are often the case -- these generate errors at l