Re: New package: DB_DataObject_FormBuilder
| From: | Ron McClain | Date: | Sun, 24 Aug 2003 04:00:02 +0000 |
| Subject: | Re: New package: DB_DataObject_FormBuilder | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20448@lists.php.net to get a copy of this message | ||
Hi Markus. Finally got some time to look at this. It looks really nice.. been meaning to
write it myself ;)
Anyhow, I think you have a bug. Shouldn't the elseif condition be is_array?
Otherwise, the package looks great. I know I'll make use of it. Just thought I'd point that out.
function _array2date($date, $timestamp=false)
{
if (is_array($date) && checkdate($date['M'], $date['d'], $date['Y'])) {
$strDate = $date['Y'].'-'.$date['M'].'-'.$date['d'];
} elseif (is_int($date) && $timestamp==true) {
--> ^^^^ is_array
$strDate = strtotime($date['Y'].'-'.$date['M'].'-'.$date['d']);
} else {
$strDate = date('Y-m-d', time());
}
return $strDate;
}