specialchars DB error.

git-svn-id: https://develop.svn.wordpress.org/trunk@4061 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-07-28 22:58:38 +00:00
parent 86b08a2787
commit b15ddd4e0d
1 changed files with 3 additions and 1 deletions

View File

@ -93,12 +93,14 @@ class wpdb {
$EZSQL_ERROR[] =
array ('query' => $this->last_query, 'error_str' => $str);
$str = wp_specialchars($str, 1);
$query = wp_specialchars($this->last_query, 1);
// Is error output turned on or not..
if ( $this->show_errors ) {
// If there is an error then take note of it
print "<div id='error'>
<p class='wpdberror'><strong>WordPress database error:</strong> [$str]<br />
<code>$this->last_query</code></p>
<code>$query</code></p>
</div>";
} else {
return false;