1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 11:42:17 +02:00
Files
archived-php-src/ext/odbc/tests/bug78473.phpt
Christoph M. Becker 8417bc19b8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78473: odbc_close() closes arbitrary resources
2019-08-28 18:10:33 +02:00

19 lines
394 B
PHP

--TEST--
Bug #78473 (odbc_close() closes arbitrary resources)
--SKIPIF--
<?php
if (!extension_loaded('odbc')) die('skip odbc extension not available');
?>
--FILE--
<?php
try {
odbc_close(STDIN);
} catch (TypeError $err) {
echo $err->getMessage(), PHP_EOL;
}
var_dump(STDIN);
?>
--EXPECTF--
odbc_close(): supplied resource is not a valid ODBC-Link resource
resource(%d) of type (stream)