Annotation of embedaddon/php/ext/standard/tests/serialize/bug64354_2.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #64354 (Unserialize array of objects whose class can't be autoloaded fail)
! 3: --FILE--
! 4: <?php
! 5: class A {
! 6: public function __wakeup() {
! 7: throw new Exception("Failed");
! 8: }
! 9: }
! 10:
! 11: spl_autoload_register(
! 12: function($class) {
! 13: throw new Exception("Failed");
! 14: }
! 15: );
! 16:
! 17: try {
! 18: var_dump(unserialize('a:2:{i:0;O:1:"A":0:{}i:1;O:1:"B":0:{}}'));
! 19: } catch (Exception $e) {
! 20: var_dump($e->getMessage());
! 21: }
! 22: ?>
! 23: --EXPECTF--
! 24: string(6) "Failed"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>