Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.2.0

Bug #19231 Call to undefined function odbc_get_last_message()
Submitted: 2012-01-18 19:49 UTC
From: cklein13 Assigned: doconnor
Status: Closed Package: MDB2_Driver_odbc (version 0.1.0)
PHP Version: 5.3.5 OS: Ubuntu 11.04
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 24 - 4 = ?

 
 [2012-01-18 19:49 UTC] cklein13 (Christopher Klein)
Description: ------------ In "MDB2/Driver/odbc.php" on line 97 there is this call: $native_msg = @odbc_get_last_message(); But that particular function does not exist at the moment and IMHO never existed at any time. The correct function is "odbc_errormsg()" instead (http://php.net/manual/en/function.odbc-errormsg.php). The author does already provide some wrapper functions at the head of "odbc.php": function odbc_query($query, $connection) { return odbc_do($connection, $query); } function odbc_fetch_row_wrapper($result) { return @array_values(odbc_fetch_array($result)); } function odbc_fetch_assoc ($result){ return odbc_fetch_array($result); } Thus one possible solution would be to provide one further wrapper function: function odbc_get_last_message() { if (function_exists("odbc_errormsg")) { return odbc_errormsg(); } } As a workaround people could define that wrapper function within their application code before invoking MDB2-methods.

Comments

 [2012-01-24 03:34 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Closed -Assigned To: +Assigned To: doconnor
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.