Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #2530 strtotime error in HTML/QuickForm/date.php
Submitted: 2004-10-14 15:34 UTC
From: fizz at beyond dot hjsoft dot com Assigned: avb
Status: Closed Package: HTML_QuickForm
PHP Version: 5.0.2 OS: Fedora Core 1
Roadmaps: (Not assigned)    
Subscription  


 [2004-10-14 15:34 UTC] fizz at beyond dot hjsoft dot com
Description: ------------ On pages that use QuickForm date field type and PHP 5.0.2 it produces a warning as follows: Warning: strtotime() [function.strtotime]: Called with an empty time parameter. in /usr/share/pear/HTML/QuickForm/date.php on line 385 a simple fix is add the following two lines prior to the strtotime call (on line 385). if ($value == NULL) $value = "now"; effectively setting the default value to today if none is set. Expected result: ---------------- No warning message. Actual result: -------------- Warning: strtotime() [function.strtotime]: Called with an empty time parameter. in /usr/share/pear/HTML/QuickForm/date.php on line 387

Comments

 [2004-10-14 17:42 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-10-14 18:27 UTC] fizz at beyond dot hjsoft dot com
This is the code that caused it. $date = &$this->addElement('date', 'billing_month', 'Billing Month', array('format' => 'FY', 'minYear' => 2004, 'maxYear' => date("Y"))); $date->setValue($billing_timestamp); where $billing_timestamp is not set (so effectively NULL).
 [2004-10-14 19:56 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!