Issues

ZF-2622: Zend_Date->set() claims "Undefined offset: -1" at lines 1337/1340

Issue Type: Bug Created: 2008-02-12T06:48:13.000+0000 Last Updated: 2008-02-26T12:56:00.000+0000 Status: Resolved Fix version(s): - 1.0.4 (26/Feb/08)

Reporter: David Berlioz (quazardous) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:

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.

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts