1
0

Patch by hanno boeck

This commit is contained in:
Garvin Hicking
2008-03-25 12:39:55 +00:00
parent 40a8c11d13
commit 6ea572211b
4 changed files with 21 additions and 18 deletions

View File

@ -96,13 +96,13 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re
}
if (!$expectError && mysql_error($serendipity['dbConn']) != '') {
$msg = '<pre>' . $sql . '</pre> / ' . mysql_error($serendipity['dbConn']);
$msg = '<pre>' . $sql . '</pre> / ' . htmlspecialchars(mysql_error($serendipity['dbConn']));
return $msg;
}
if (!$c) {
if (!$expectError && !$serendipity['production']) {
print '<pre>' . $sql . '</pre> / ' . mysql_error($serendipity['dbConn']);
print '<pre>' . $sql . '</pre> / ' . htmlspecialchars(mysql_error($serendipity['dbConn']));
if (function_exists('debug_backtrace') && $reportErr == true) {
highlight_string(var_export(debug_backtrace(), 1));
}
@ -340,7 +340,7 @@ function serendipity_db_probe($hash, &$errs) {
if (!($c = @mysql_connect($hash['dbHost'], $hash['dbUser'], $hash['dbPass']))) {
$errs[] = 'Could not connect to database; check your settings.';
$errs[] = 'The mySQL error was: ' . mysql_error();
$errs[] = 'The mySQL error was: ' . htmlspecialchars(mysql_error());
return false;
}
@ -348,7 +348,7 @@ function serendipity_db_probe($hash, &$errs) {
if (!@mysql_select_db($hash['dbName'])) {
$errs[] = 'The database you specified does not exist.';
$errs[] = 'The mySQL error was: ' . mysql_error();
$errs[] = 'The mySQL error was: ' . htmlspecialchars(mysql_error());
return false;
}