ZF-4060: setDate() with an array parameter throw an exception

Issue Type: Bug Created: 2008-08-25T08:42:27.000+0000 Last Updated: 2008-09-02T10:39:32.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Mehdi Rande (mehdi.rande) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:


When using setDate with an array an 'no day,month or year given in array' exception is thrown

<pre class="highlight">
$date = new Zend_Date();
$date->setDate(array('year' => 2008, 'month' => 1, 'day' => 1));


<pre class="highlight">
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"


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.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.