Annotation of embedaddon/php/Zend/tests/bug41421.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #41421 (Uncaught exception from a stream wrapper segfaults)
! 3: --FILE--
! 4: <?php
! 5:
! 6: class wrapper {
! 7: function stream_open() {
! 8: return true;
! 9: }
! 10: function stream_eof() {
! 11: throw new exception();
! 12: }
! 13: }
! 14:
! 15: stream_wrapper_register("wrap", "wrapper");
! 16: $fp = fopen("wrap://...", "r");
! 17: feof($fp);
! 18:
! 19: echo "Done\n";
! 20: ?>
! 21: --EXPECTF--
! 22: Warning: feof(): wrapper::stream_eof is not implemented! Assuming EOF in %s on line %d
! 23:
! 24: Fatal error: Uncaught exception 'Exception' in %s:%d
! 25: Stack trace:
! 26: #0 [internal function]: wrapper->stream_eof()
! 27: #1 %s(%d): feof(Resource id #6)
! 28: #2 {main}
! 29: thrown in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>