Annotation of embedaddon/php/ext/standard/tests/file/bug39551.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #39551 (Segfault with stream_bucket_new in user filter)
                      3: --FILE--
                      4: <?php
                      5: 
                      6: $bucket = stream_bucket_new(fopen('php://temp', 'w+'), '');
                      7: 
                      8: class bucketFilter {
                      9:        public function filter($in, $out, &$consumed, $closing ){
                     10: 
                     11:                $bucket = stream_bucket_new(fopen('php://temp', 'w+'), '');
                     12:                stream_bucket_append($out, $bucket);
                     13:                return PSFS_PASS_ON;
                     14:        }
                     15: }
                     16: 
                     17: stream_filter_register('bucketfault', 'bucketFilter');
                     18: stream_filter_append($s = fopen('php://temp', 'r+'), 'bucketfault');
                     19: stream_get_contents($s);
                     20: 
                     21: echo "Done\n";
                     22: ?>
                     23: --EXPECTF--    
                     24: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>