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  


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