ZF-4060: setDate() with an array parameter throw an exception
Description
When using setDate with an array an 'no day,month or year given in array' exception is thrown
$date = new Zend_Date();
$date->setDate(array('year' => 2008, 'month' => 1, 'day' => 1));
give
Fatal error: Uncaught exception 'Zend_Date_Exception' with message 'no day,month or year given in array' in /var/www/Zend/Date.php:2882
Stack trace:
#0 /var/www/lib/Zend/Date.php(2928): Zend_Date->_date('set', Array, NULL, NULL)
#1 /var/www/test/zend.php(98): Zend_Date->setDate(Array)
This function try ton search year, month and day keys in a non initialized "$time" variable instead of "$date"
Comments
Posted by Thomas Weidner (thomas) on 2008-08-25T11:19:42.000+0000
Thanks for the notification. Fixed with r11062
Posted by Wil Sinclair (wil) on 2008-09-02T10:39:32.000+0000
Updating for the 1.6.0 release.