ZF-2622: Zend_Date->set() claims "Undefined offset: -1" at lines 1337/1340
Description
Snapshot : 7941
$date->set('00:00:00', Zend_Date::TIMES);
this line produces the folowing errors :
Notice: Undefined offset: -1 in U:\dev\Zend\ZendFramework-20080212-7941\library\Zend\Date.php on line 1337
Notice: Undefined offset: -1 in U:\dev\Zend\ZendFramework-20080212-7941\library\Zend\Date.php on line 1340
preg_match('/(\w{3,30})/', $zone, $match);
try {
$oldzone = $this->getTimezone();
$result = $this->setTimezone($match[count($match) - 1]); <<<<<<<<<<< 1337
$this->setTimezone($oldzone);
if ($result !== $oldzone) {
return $match[count($match) - 1]; <<<<<<<<<<<<<<<<<<<<< 1340
}
} catch (Exception $e) {
// fall through
}
PS : in snapshot 7668 : no problem.
Comments
Posted by Thomas Weidner (thomas) on 2008-02-12T16:41:02.000+0000
The code has changed in the meantime... I am not able to reproduce it with 7967... please test with the latest revision and give feedback.
Posted by Thomas Weidner (thomas) on 2008-02-16T12:55:27.000+0000
Not reproducable with actual revision. No feedback from reporter. Closing ticket.
Posted by David Berlioz (quazardous) on 2008-02-20T02:31:27.000+0000
sorry, no time to test before.
tested in 8205 : ok !
bug resolved thx.