Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php	(revision 7148)
+++ wp-includes/wp-db.php	(working copy)
@@ -184,7 +184,8 @@
 		$error_str = "WordPress database error $str for query $this->last_query";
 		if ( $caller = $this->get_caller() )
 			$error_str .= " made by $caller";
-		@error_log($error_str, 0);
+		if (function_exists('error_log'))
+			@error_log($error_str, 0);
 
 		// Is error output turned on or not..
 		if ( !$this->show_errors )
