Bug #78473 [Asn->Csd]: odbc_close() closes arbitrary resources

From: Date: Wed, 28 Aug 2019 16:11:46 +0000
Subject: Bug #78473 [Asn->Csd]: odbc_close() closes arbitrary resources
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222473@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78473&edit=1 ID: 78473 Updated by: cmb@php.net Reported by: cmb@php.net Summary: odbc_close() closes arbitrary resources -Status: Assigned +Status: Closed Type: Bug Package: ODBC related Operating System: * PHP Version: 7.2Git-2019-08-28 (Git) Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=b5572658166c4b8cbc1d332877a7a84c6e18a1c1 Log: Fix #78473: odbc_close() closes arbitrary resources Previous Comments: ------------------------------------------------------------------------ [2019-08-28 15:44:51] cmb@php.net Description: ------------ While odbc_close() warns if a resource which is not an odbc link or an odbc link persistent resource is passed, it still goes on to close the resource. Test script: --------------- <?php odbc_close(STDIN); var_dump(STDIN); Expected result: ---------------- Warning: odbc_close(): supplied resource is not a valid ODBC-Link resource in %s on line 3 bool(false) resource(1) of type (stream) Actual result: -------------- Warning: odbc_close(): supplied resource is not a valid ODBC-Link resource in $s on line 3 NULL resource(1) of type (Unknown) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78473&edit=1

« previous php.bugs (#222473) next »