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

Michael M Slusarz slusarz at horde.org
Tue Feb 22 22:14:59 UTC 2011


Quoting Jan Schneider <jan at horde.org>:

> 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.

DateTime is a good idea and good step forward for PHP.  Too bad it is  
very broken design-wise in 5.2 (e.g. no serialization).

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]




More information about the dev mailing list