--TEST-- Bug #54350: Memory corruption with user_filter --FILE-- stream); } catch (TypeError $e) { echo $e->getMessage(), "\n"; } return 0; } } stream_filter_register('user_filter','user_filter'); $fd = fopen('php://memory','w'); $filter = stream_filter_append($fd, 'user_filter'); fwrite($fd, "foo"); ?> --EXPECTF-- Warning: fclose(): 5 is not a valid stream resource in %s on line %d fclose(): supplied resource is not a valid stream resource