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

Bug #1715 array2date: string replacement
Submitted: 2004-06-24 20:21 UTC
From: tobias dot nix at web dot de Assigned: justinpatrin
Status: Closed Package: DB_DataObject_FormBuilder
PHP Version: Irrelevant OS: debian
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 31 - 4 = ?

 
 [2004-06-24 20:21 UTC] tobias dot nix at web dot de
Description: ------------ Minutes and seconds get lost on sprintf replacement. Line 1034 $strDate .= sprintf(' %s:$s:$s', $dateInput['H'], $dateInput['i'], $dateInput['s']); should be $strDate .= sprintf(' %s:%s:%s', $dateInput['H'], $dateInput['i'], $dateInput['s']); diff: --- /usr/share/php/DB/DataObject/FormBuilder.php Thu Jun 24 22:14:35 2004 +++ FormBuilder.php Thu Jun 24 22:13:16 2004 @@ -1417,7 +1417,7 @@ } $strDate = sprintf('%s-%s-%s', $dateInput['Y'], $month, $dateInput['d']); if (isset($dateInput['H']) && isset($dateInput['i']) && isset($dateInput['s'])) { - $strDate .= sprintf(' %s:%s:%s', $dateInput['H'], $dateInput['i'], $dateInput['s']); + $strDate .= sprintf(' %s:$s:$s', $dateInput['H'], $dateInput['i'], $dateInput['s']); } $this->debug("<i>_array2date():</i> to $strDate ..."); return $strDate; @@ -1838,4 +1838,4 @@ } } -?> +?> \ No newline at end of file

Comments

 [2004-06-24 20:27 UTC] justinpatrin
This bug has been fixed in CVS.nnIn case this was a documentation problem, the fix will show up at thenend of next Sunday (CET) on pear.php.net.nnIn case this was a pear.php.net website problem, the change will shownup on the website in short time.n nThank you for the report, and for helping us make PEAR better.