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:
@@ -216,7 +216,16 @@ class dbal_sqlite extends dbal
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
|
||||
return ($query_id) ? @sqlite_fetch_array($query_id, SQLITE_ASSOC) : false;
|
||||
$row = @sqlite_fetch_array($query_id, SQLITE_ASSOC);
|
||||
if ($row)
|
||||
{
|
||||
foreach ($row as $key => $value)
|
||||
{
|
||||
$row[$key] = (strpos($key, 'bitfield') === false) ? $value : sqlite_udf_decode_binary($value);
|
||||
}
|
||||
}
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -307,6 +316,14 @@ class dbal_sqlite extends dbal
|
||||
return @sqlite_escape_string($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape string used in sql query
|
||||
*/
|
||||
function sql_escape_binary($msg)
|
||||
{
|
||||
return "'" . @sqlite_udf_encode_binary($msg) . "'";
|
||||
}
|
||||
|
||||
/**
|
||||
* return sql error array
|
||||
* @access: private
|
||||
|
Reference in New Issue
Block a user