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

1.1     ! misho       1: --TEST--
        !             2: Bug #48476 (cloning extended DateTime class without calling parent::__constr crashed PHP)
        !             3: --FILE--
        !             4: <?php
        !             5: class MyDateTime extends DateTime {
        !             6:        public function __construct() { }
        !             7: }
        !             8: class MyDateTimeZone extends DateTimeZone {
        !             9:        public function __construct() { }
        !            10: }
        !            11: 
        !            12: $o = new MyDateTime;
        !            13: var_dump($o->format("d"));
        !            14: $x = clone $o;
        !            15: 
        !            16: var_dump($x->format("d"));
        !            17: 
        !            18: clone $o;
        !            19: 
        !            20: 
        !            21: var_dump(timezone_location_get(clone new MyDateTimezone));
        !            22: ?>
        !            23: --EXPECTF--
        !            24: Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %sbug48476.php on line 10
        !            25: bool(false)
        !            26: 
        !            27: Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %sbug48476.php on line 13
        !            28: bool(false)
        !            29: 
        !            30: Warning: timezone_location_get(): The DateTimeZone object has not been correctly initialized by its constructor in %sbug48476.php on line 18
        !            31: bool(false)
        !            32: 
        !            33: 

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