File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug41421.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    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>