MDB2_Driver_pgsql MDB2_PORTABILITY_RTRIM bug?
| From: | alessandro pasotti | Date: | Tue, 18 Jul 2006 13:27:17 +0000 |
| Subject: | MDB2_Driver_pgsql MDB2_PORTABILITY_RTRIM bug? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-24675@lists.php.net to get a copy of this message | ||
Hello,
I don't understand why the 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']);
}
I'm using this version:
MDB2 2.1.0 stable
MDB2_Driver_mysql 1.1.0 stable
MDB2_Driver_pgsql 1.1.0 stable
MDB2_Driver_sqlite 1.1.0 stable
Have I missed something or should I file a bug report?
Thank you.
--
Alessandro Pasotti
--
itOpen - "Open Solutions for the Net Age"
w3: www.itopen.it
Linux User# 167502