Annotation of embedaddon/php/ext/date/tests/bug62500.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #62500 (Segfault in DateInterval class when extended)
        !             3: --INI--
        !             4: date.timezone=GMT
        !             5: --FILE--
        !             6: <?php
        !             7: class Crasher extends DateInterval {
        !             8:     public $foo;
        !             9:     public function __construct($time_spec) {
        !            10:         var_dump($this->foo);
        !            11:         $this->foo = 3;
        !            12:         var_dump($this->foo);
        !            13:         var_dump($this->{2});
        !            14:         parent::__construct($time_spec);
        !            15:     }
        !            16: }
        !            17: try {
        !            18:     $c = new Crasher('blah');
        !            19: } catch (Exception $e) {
        !            20:     var_dump($e->getMessage());
        !            21: }
        !            22: --EXPECTF--
        !            23: NULL
        !            24: int(3)
        !            25: 
        !            26: Notice: Undefined property: Crasher::$2 in %sbug62500.php on line %d
        !            27: NULL
        !            28: string(%s) "DateInterval::__construct(): Unknown or bad format (blah)"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>