Annotation of embedaddon/php/tests/lang/bug24573.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #24573 (debug_backtrace() crashes if $this is set to null)
! 3: --FILE--
! 4: <?php
! 5:
! 6: class Foo {
! 7: function Bar() {
! 8: $__this = $this;
! 9: $this = null;
! 10: debug_backtrace();
! 11: $this = $__this;
! 12: }
! 13: }
! 14:
! 15: $f = new Foo;
! 16:
! 17: $f->Bar();
! 18:
! 19: echo "OK\n";
! 20:
! 21: ?>
! 22: --EXPECTF--
! 23:
! 24: Fatal error: Cannot re-assign $this in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>