Hi
The problem is that your method also checks if the value is true, or
can be converted to true. As you may know, if $array["key"] is an
empty string or zero int,  isset($array['key']) && $array['key'] will
be false.

I'm not sure we always want to do that extra check. But in this case
it won't matter.

On 6/10/07, Sigurd Nes <[EMAIL PROTECTED]> wrote:
Hi,
To check if a key has a value - I think we should use:
if (isset($array['key']) && $array['key'])

and to check if it has no value:
if (!isset($array['key']) || !$array['key'])

What do you think?

Regards

Sigurd


Johan Gunnarsson wrote:
> Hi,
> I stumbled upon some NOTICE errors while hacking on a hook on password
> changes. See attachment.
>
> (This is my first phpgw patch - yay!)
> ------------------------------------------------------------------------
>
> _______________________________________________
> phpGroupWare-developers mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/phpgroupware-developers



_______________________________________________
phpGroupWare-developers mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/phpgroupware-developers



_______________________________________________
phpGroupWare-developers mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/phpgroupware-developers

Reply via email to