Skip to content

Commit

Permalink
- MDB2_PORTABILITY_RTRIM ignored by driver (Bug #8239)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.php.net/repository/pear/packages/MDB2/trunk@216704 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
Lukas Smith committed Jul 19, 2006
1 parent af51687 commit d3c3264
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions MDB2/Driver/pgsql.php
Expand Up @@ -986,8 +986,10 @@ function &fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null)
$null = null;
return $null;
}
if ($this->db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) {
$this->db->_fixResultArrayValues($row, MDB2_PORTABILITY_EMPTY_TO_NULL);
if (($mode = ($this->db->options['portability'] & MDB2_PORTABILITY_RTRIM)
+ ($this->db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL))
) {
$this->db->_fixResultArrayValues($row, $mode);
}
if (!empty($this->values)) {
$this->_assignBindColumns($row);
Expand Down
6 changes: 4 additions & 2 deletions MDB2/Driver/sqlite.php
Expand Up @@ -869,8 +869,10 @@ function &fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null)
$null = null;
return $null;
}
if ($this->db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) {
$this->db->_fixResultArrayValues($row, MDB2_PORTABILITY_EMPTY_TO_NULL);
if (($mode = ($this->db->options['portability'] & MDB2_PORTABILITY_RTRIM)
+ ($this->db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL))
) {
$this->db->_fixResultArrayValues($row, $mode);
}
if (!empty($this->values)) {
$this->_assignBindColumns($row);
Expand Down

0 comments on commit d3c3264

Please sign in to comment.