Closed (fixed)
Project:
Webform
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2006 at 21:24 UTC
Updated:
11 Jun 2007 at 00:47 UTC
Jump to comment: Most recent file
I got a couple of errors in a form. Both relating to date and time functions. (Multiple instances of 2 distinct errors)
warning: strtotime() [function.strtotime]: Called with an empty time parameter. in /__/htdocs/modules/webform/components/date.inc on line 50.
warning: strtotime() [function.strtotime]: Called with an empty time parameter. in /__/htdocs/modules/webform/components/time.inc on line 59.
Easily solved;
// $Id: date.inc,v 1.1.2.5 2006/07/15 08:09:21 ullgren Exp $
Line 50
// $timestamp = strtotime($component['value']);
$timestamp = strtotime($component['value'] || 'NopeIAmEmpty');
// $Id: time.inc,v 1.1.2.4 2006/07/15 08:09:21 ullgren Exp $
Line 59
// $timestamp = strtotime($component['value']);
$timestamp = strtotime($component['value'] || 'NopeIAmEmpty');
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | webform.strtotime_bug.patch | 1005 bytes | BachusII |
Comments
Comment #1
quicksketchThis was fixed a while back I believe. Please reopen if the problem persists.
Comment #2
BachusII commentedThe current versions of these files, both HEAD and 4.7 (date.inc v1.13 (HEAD), date.inc v1.1.2.6 (4.7), time.inc v1.14 (HEAD), time.inc v1.1.2.5 (4.7), still show the possibility for this problem.
Mind you, I'm on PHP v5(.0.4). I've noticed more differences in handling with ealier versions of PHP (4.x) that could be a cause for you not having/noticing the problem, if you're on 4.x that is.
Where's the status "tentative (keep an eye on it)" when you need it ;)
Comment #3
BachusII commentedRecently upgraded to webform-5.x-1.2 and the problem remains. Patch included.
Still could be a PHP 5(.0.4) vs. PHP 4 thing.
Comment #4
quicksketchI cleaned this up with a broader if() statement which skips the strtotime() altogether if a default value is not set. The fix is in the development version and will make it into 1.3.
Comment #5
(not verified) commented