summaryrefslogtreecommitdiffstats
path: root/wp-includes/wp-db.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/wp-db.php')
-rw-r--r--wp-includes/wp-db.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php
index dec8bc4..bbef0cf 100644
--- a/wp-includes/wp-db.php
+++ b/wp-includes/wp-db.php
@@ -233,15 +233,10 @@ class wpdb {
if ( !$this->show_errors )
return false;
- $str = htmlspecialchars($str, ENT_QUOTES);
- $query = htmlspecialchars($this->last_query, ENT_QUOTES);
-
// If there is an error then take note of it
- $msg = "WordPress database error: [$str]\n$query\n";
+ $msg = "WordPress database error: [$str]\n{$this->query}\n";
if( defined( 'ERRORLOGFILE' ) )
error_log( $msg, 3, CONSTANT( 'ERRORLOGFILE' ) );
- else
- error_log( $msg, 0 );
if( defined( 'DIEONDBERROR' ) )
die( $msg );
}