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

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.

Not reproducable with actual revision. No feedback from reporter. Closing ticket.

sorry, no time to test before.

tested in 8205 : ok !

bug resolved thx.