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

Bug #8239 MDB2_PORTABILITY_RTRIM ignored by driver
Submitted: 2006-07-18 14:22 UTC
From: ale dot pas at tiscali dot it Assigned: lsmith
Status: Closed Package: MDB2 (version 1.1.0)
PHP Version: 5.1.2 OS: linux
Roadmaps: (Not assigned)    
Subscription  


 [2006-07-18 14:22 UTC] ale dot pas at tiscali dot it (alessandro pasotti)
Description: ------------ option MDB2_PORTABILITY_RTRIM seems to be ignored by pgsql driver, in line 915 of file MDB2/Driver/pgsql.php there is a line like this, if ($this->db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->db->_fixResultArrayValues($row, MDB2_PORTABILITY_EMPTY_TO_NULL); } I believe it should pass control to _fixResultArrayValues also when MDB2_PORTABILITY_RTRIM is set. This works for me (but maybe breaks somewhere else): if ($this->db->options['portability'] & (MDB2_PORTABILITY_EMPTY_TO_NULL | MDB2_PORTABILITY_RTRIM )) { $this->db->_fixResultArrayValues($row, $this->db->options['portability']); } Test script: --------------- http://elpaso.homelinux.org/pear_bug.txt Expected result: ---------------- array 'driver_id' => '1' (length=1) 'driver' => 'GD/Gif' (length=6) 'tstamp' => '2004-04-01 12:00:00' (length=19) Actual result: -------------- array 'driver_id' => '1' (length=1) 'driver' => 'GD/Gif ' (length=50) 'tstamp' => '2004-04-01 12:00:00' (length=19)

Comments

 [2006-07-19 10:42 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-07-19 12:50 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!