[dev] [commits] Horde branch master updated. d94a2c70c18734c99734f70d13e0f9d87581e2ec

Jan Schneider jan at horde.org
Tue Feb 22 21:02:07 UTC 2011


Zitat von Michael M Slusarz <slusarz at horde.org>:

> -----------------------------------------------------------------------
>
> commit cc8d18504e306396a9bb6748241a50baca36c4a8
> Author: Michael M Slusarz <slusarz at curecanti.org>
> Date:   Tue Feb 22 09:51:01 2011 -0700
>
>     Bug #9589: DateTime returns error in PHP 5.2, not a thrown Exception
>
>  framework/Imap_Client/lib/Horde/Imap/Client/DateTime.php |   15  
> ++++++++-----
>  1 files changed, 9 insertions(+), 6 deletions(-)
>
> http://git.horde.org/horde-git/-/commit/cc8d18504e306396a9bb6748241a50baca36c4a8

That's not quite correct. The constructor will *always* return an  
object. Anything else is not possible in PHP. It's still true that the  
ctor doesn't throw an exception prior to 5.3, it prints an error  
message instead.
What you did in this commit can be achieved throug date_create()  
though, which actually returns false in 5.2.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list