Skip to content
Permalink
Browse files

Fix retrieving of NULLs in PG databases and binary fields

  • Loading branch information...
stronk7
stronk7 committed Oct 14, 2009
1 parent ccbef34 commit 2b4cf032fa9718795c17e2dcbec81a0b8541f949
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/dml/pgsql_native_moodle_database.php
  2. +1 −1 lib/dml/pgsql_native_moodle_recordset.php
@@ -653,7 +653,7 @@ public function get_records_sql($sql, array $params=null, $limitfrom=0, $limitnu
$id = reset($row);
if ($blobs) {
foreach ($blobs as $blob) {
$row[$blob] = pg_unescape_bytea($row[$blob]);
$row[$blob] = $row[$blob] !== null ? pg_unescape_bytea($row[$blob]) : null;
}
}
if (isset($return[$id])) {
@@ -62,7 +62,7 @@ private function fetch_next() {
if ($this->blobs) {
foreach ($this->blobs as $blob) {
$row[$blob] = pg_unescape_bytea($row[$blob]);
$row[$blob] = $row[$blob] !== null ? pg_unescape_bytea($row[$blob]) : null;
}
}

0 comments on commit 2b4cf03

Please sign in to comment.
You can’t perform that action at this time.