Annotation of embedaddon/php/ext/date/tests/bug62852_var3.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #62852 (Unserialize invalid DateTime causes crash), variation 3
! 3: --INI--
! 4: date.timezone=GMT
! 5: --FILE--
! 6: <?php
! 7: $s2 = 'O:3:"Foo":3:{s:4:"date";s:19:"0000-00-00 00:00:00";s:13:"timezone_type";i:0;s:8:"timezone";s:3:"UTC";}';
! 8:
! 9: global $foo;
! 10:
! 11: class Foo extends DateTime {
! 12: function __wakeup() {
! 13: global $foo;
! 14: $foo = $this;
! 15: parent::__wakeup();
! 16: }
! 17: }
! 18:
! 19: try {
! 20: unserialize( $s2 );
! 21: } catch ( Exception $e ) {}
! 22: var_dump( $foo );
! 23:
! 24: --EXPECTF--
! 25: Fatal error: Invalid serialization data for DateTime object in %sbug62852_var3.php on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>