xref: /php-src/ext/libxml/tests/bug63389.phpt (revision 74859783)
1--TEST--
2Bug #63389 (Missing context check on libxml_set_streams_context() causes memleak)
3--EXTENSIONS--
4libxml
5--FILE--
6<?php
7$fp = fopen("php://input", "r");
8libxml_set_streams_context($fp);
9try {
10    libxml_set_streams_context("a");
11} catch (TypeError $e) {
12    echo $e->getMessage(), "\n";
13}
14echo "okey";
15?>
16--EXPECT--
17libxml_set_streams_context(): Argument #1 ($context) must be of type resource, string given
18okey
19