#28484 [NEW]: Resource type lost for ResultSet if returned in function

From: Date: Sat, 22 May 2004 05:52:35 +0000
Subject: #28484 [NEW]: Resource type lost for ResultSet if returned in function
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-59871@lists.php.net to get a copy of this message
From: tjd1066 at rit dot edu Operating system: Win XP/Apache 2.048 PHP version: 4.3.6 PHP Bug Type: ODBC related Bug description: Resource type lost for ResultSet if returned in function Description: ------------ Mysql over ODBC connection is the DB in use. PHP win32 zip binary dist no compile options set by me. If odbc_exec() is performed in a function it performs well and returns a result resource. However if that result resource is that returned by the function the type value that was ODBC Result changes to unknown. extension=php_java.dll extension=php_pgsql.dll session.save_path = "C:\php\tmp" Reproduce code: --------------- function doQuery ($p_Query = ""){ global $g_DatabaseName, $g_DBUserName, $g_DBPassword; $v_DBHandle = odbc_connect($g_DatabaseName,$g_DBUserName,$g_DBPassword); $v_QueryResult = odbc_exec( $v_DBHandle, $p_Query); var_dump($v_QueryResult); disposeDBHandle($v_DBHandle); return $v_QueryResult; } $result=doQuery("SELECT * FROM SHIPPERS;"); var_dump($result); Expected result: ---------------- resource(34) of type (odbc result) Actual result: -------------- resource(34) of type (Unknown) -- Edit bug report at http://bugs.php.net/?id=28484&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28484&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28484&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28484&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28484&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28484&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28484&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28484&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28484&r=support Expected behavior: http://bugs.php.net/fix.php?id=28484&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28484&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28484&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28484&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28484&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28484&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28484&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28484&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28484&r=float

« previous php.bugs (#59871) next »