mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
This is kinda nice.. Before MySQL 5.0.3, traling spaces were removed when values were stored. This means that some BBCodes might not have worked. A bad thing. So, I cleverly stick a \0 at the end if this is the case. The \0 does not really modify the bitfield at all, it simply represents that there are no BBCodes in that range of eight. Idealy, we should do a version check to see if this is needed but this is just a nice fix for now...
git-svn-id: file:///svn/phpbb/trunk@6252 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -331,6 +331,16 @@ class dbal_mysql4 extends dbal
|
||||
return @mysql_real_escape_string($msg, $this->db_connect_id);
|
||||
}
|
||||
|
||||
function sql_escape_binary($msg)
|
||||
{
|
||||
// If the last char is
|
||||
if (substr($msg, -1) == ' ')
|
||||
{
|
||||
$msg .= "\0";
|
||||
}
|
||||
return "'" . $this->sql_escape($msg) . "'";
|
||||
}
|
||||
|
||||
/**
|
||||
* Build db-specific query data
|
||||
* @access: private
|
||||
|
Reference in New Issue
Block a user