Donate Share

News Clipper

Tracker: Patches

5 Correct some Cache.pm awarinigs. Time::parsedate ret. undef - ID: 400838
Last Update: Comment added ( coppit )


Raul Dias ( rsd ) - 2000-07-10 12:49

5

Closed

Accepted

Nobody/Anonymous

None

None

Public


Comments ( 4 )




Date: 2004-02-07 23:56
Sender: coppitProject AdminAccepting Donations

Logged In: YES
user_id=11103

Okay, upon taking another look, I accept the patch with some
modifications. The problem is not with parseDate('now'), which will never
return undef, but rather the other calls to parseDate(). I've done your "if
defined($val)" check for all parsed dates (except for 'now').


Date: 2000-08-16 01:35
Sender: coppitProject AdminAccepting Donations

First, sorry I didn't respond sooner. I thought I would be auto-notified of
patches

I'm not sure I see the benefit of this patch. AFAIK,
parsedate("now") will never return undef because "now"
is a recognized time for Time::ParseDate. (I'm looking at the 1.23 version
of NC.)

I guess someone could write a handler with an invalid day, but I would
think that this would be caught by the handler writer when they test it.

Did you have a particular error case in mind that this patch would fix?


Date: 2000-07-22 09:14
Sender: humi

3 small problems with this patch:

* The problematic function's name is parsedate not parsedata.
* In the first if-clause it should read $temp_now instead of $temp_date.
* In the second if-clause it should read $parsedDate instead of
$parseDate.


Date: 2000-07-10 14:07
Sender: rsd

The real problem is that parsedate() returns
undef on some cases.
This mean that all data returned by it has to be checked it defined before
using it.


Log in to comment.




Attached File ( 1 )

Filename Description Download
None None Download

Changes ( 3 )

Field Old Value Date By
status_id Open 2004-02-07 23:56 coppit
resolution_id None 2004-02-07 23:56 coppit
close_date - 2004-02-07 23:56 coppit