mirror of
https://github.com/php/php-src.git
synced 2026-04-18 21:41:22 +02:00
We have to bail out, if an invalid resource is given. For consistency with the other `zend_fetch_resource(2)` calls, we return `FALSE`.
15 lines
343 B
PHP
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)
|