Call error_log() in wp-db without unnecessary conditionals. fixes #21103.

git-svn-id: http://core.svn.wordpress.org/trunk@21807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-09-11 01:35:43 +00:00
parent 884a89055b
commit 1508b46bb4

View File

@ -1030,11 +1030,7 @@ class wpdb {
else
$error_str = sprintf( __( 'WordPress database error %1$s for query %2$s' ), $str, $this->last_query );
if ( function_exists( 'error_log' )
&& ( $log_file = @ini_get( 'error_log' ) )
&& ( 'syslog' == $log_file || @is_writable( $log_file ) )
)
@error_log( $error_str );
error_log( $error_str );
// Are we showing errors?
if ( ! $this->show_errors )