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

Bug #12010 MDB2_PORTABILITY_RTRIM not working
Submitted: 2007-09-08 19:51 UTC
From: elhoyos Assigned: quipo
Status: Closed Package: MDB2_Driver_mssql (version 1.2.1)
PHP Version: 5.2.3 OS: Windows 2003 SBS
Roadmaps: (Not assigned)    
Subscription  


 [2007-09-08 19:51 UTC] elhoyos (Juan David Hoyos Renteria)
Description: ------------ MDB2_PORTABILITY_RTRIM option is not working when returning data from a VARCHAR field of a column that originally is empty. I'm assuming the MDB2_PORTABILITY_ALL makes use of the affected option. You may want to look at this bug for pgsql driver: http://pear.php.net/bugs/bug.php?id=8239 Is this happening to all the drivers? Test script: --------------- $options = array( 'debug' => 2, 'portability' => MDB2_PORTABILITY_ALL ); $mdb2 =& MDB2::singleton($dsn, $options); $mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC); $sql = 'SELECT varchar_column AS myemptycolumn FROM table'; $res =& $mdb2->query($sql); $row = $res->fetchRow(); echo strlen($row['myemptycolumn']); Expected result: ---------------- 0 // There's no data in the field Actual result: -------------- 1

Comments

 [2007-10-06 11:58 UTC] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. 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.