Patch by hanno boeck
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user