mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
This should end some issues we have been having regarding the proper binary encoding of stuff. :D
Acyd Burn: quit breaking the schema :P git-svn-id: file:///svn/phpbb/trunk@6238 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -258,7 +258,16 @@ class dbal_postgres extends dbal
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
|
||||
return ($query_id) ? @pg_fetch_assoc($query_id, NULL) : false;
|
||||
$row = @pg_fetch_assoc($query_id, null);
|
||||
if ($row)
|
||||
{
|
||||
foreach ($row as $key => $value)
|
||||
{
|
||||
$row[$key] = (strpos($key, 'bitfield') === false) ? $value : pg_unescape_bytea($value);
|
||||
}
|
||||
}
|
||||
|
||||
return ($query_id) ? $row : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -378,6 +387,14 @@ class dbal_postgres extends dbal
|
||||
return @pg_escape_string($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape string used in sql query
|
||||
*/
|
||||
function sql_escape_binary($msg)
|
||||
{
|
||||
return "'" . @pg_escape_bytea($msg) . "'";
|
||||
}
|
||||
|
||||
/**
|
||||
* return sql error array
|
||||
* @access: private
|
||||
|
Reference in New Issue
Block a user