phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [phpGroupWare-developers] [patch] Fix for NOTICEs in preferences/cha


From: Johan Gunnarsson
Subject: Re: [phpGroupWare-developers] [patch] Fix for NOTICEs in preferences/changepassword.php
Date: Sun, 10 Jun 2007 21:41:27 +0200

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 <address@hidden> 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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/phpgroupware-developers



_______________________________________________
phpGroupWare-developers mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/phpgroupware-developers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]