1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 21:41:22 +02:00
Files
archived-php-src/ext/odbc/tests/bug78473.phpt
Christoph M. Becker b557265816 Fix #78473: odbc_close() closes arbitrary resources
We have to bail out, if an invalid resource is given.  For consistency
with the other `zend_fetch_resource(2)` calls, we return `FALSE`.
2019-08-28 17:55:15 +02:00

15 lines
343 B
PHP

--TEST--
Bug #78473 (odbc_close() closes arbitrary resources)
--SKIPIF--
<?php
if (!extension_loaded('odbc')) die('skip odbc extension not available');
?>
--FILE--
<?php
odbc_close(STDIN);
var_dump(STDIN);
?>
--EXPECTF--
Warning: odbc_close(): supplied resource is not a valid ODBC-Link resource in %s on line %d
resource(%d) of type (stream)