Details
Description
Just upgraded to v1.8.2 from 1.7.5 and I am getting error (debug warning in Zend studio)
---/DateObject.php line 667 - getdate() expects parameter 1 to be long, string given
Running through the debugger;
$timestamp is a zero length string. The line before 667 is looking for a null timestamp in which case it would return the current time via getdate(). Perhaps the code needs changing to check for zero length string as well ?
The code that creates this condition is:
$dValue = '2009-04-14'; //or any date string
$d = new Zend_Date($dValue);
$value = $d->get(Zend_Date::DATE_SHORT);
The returned $value is as expected so as per priority this is a minor one.
Issue Links
| This issue is duplicated by: | ||||
| ZF-7188 | getDate() expects parameter 1 to be long, string given in DateObject.php line 667 |
|
|
|
Which php release ?
Which OS ?
Which locale has been used ?
Which timezone has been set ?
Is this just a warning in your debugger or a warning thrown by PHP ?
The null-check is ONLY done when the object is initiated. In this case a null is given. In any other case the timestamp is a integer. Only when it extends integer it's a string but this case is checked by the abs method.