1
0
This commit is contained in:
Garvin Hicking
2008-03-25 14:04:06 +00:00
parent d911dcad46
commit 4e734a6d6e
2 changed files with 4 additions and 4 deletions

View File

@ -96,13 +96,13 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re
} }
if (!$expectError && mysql_error($serendipity['dbConn']) != '') { if (!$expectError && mysql_error($serendipity['dbConn']) != '') {
$msg = '<pre>' . $sql . '</pre> / ' . htmlspecialchars(mysql_error($serendipity['dbConn'])); $msg = '<pre>' . htmlspecialchars($sql) . '</pre> / ' . htmlspecialchars(mysql_error($serendipity['dbConn']));
return $msg; return $msg;
} }
if (!$c) { if (!$c) {
if (!$expectError && !$serendipity['production']) { if (!$expectError && !$serendipity['production']) {
print '<pre>' . $sql . '</pre> / ' . htmlspecialchars(mysql_error($serendipity['dbConn'])); print '<pre>' . htmlspecialchars($sql) . '</pre> / ' . htmlspecialchars(mysql_error($serendipity['dbConn']));
if (function_exists('debug_backtrace') && $reportErr == true) { if (function_exists('debug_backtrace') && $reportErr == true) {
highlight_string(var_export(debug_backtrace(), 1)); highlight_string(var_export(debug_backtrace(), 1));
} }

View File

@ -161,13 +161,13 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re
} }
if (!$expectError && sqlrcur_errorMessage($cur) != '') { if (!$expectError && sqlrcur_errorMessage($cur) != '') {
$msg = '<pre>' . $sql . '</pre> / ' . sqlrcur_errorMessage($cur); $msg = '<pre>' . htmlspecialchars($sql) . '</pre> / ' . htmlspecialchars(sqlrcur_errorMessage($cur));
return $msg; return $msg;
} }
if (!$c) { if (!$c) {
if (!$expectError && !$serendipity['production']) { if (!$expectError && !$serendipity['production']) {
print '<pre>' . $sql . '</pre> / ' . sqlrcur_errorMessage($cur); print '<pre>' . htmlspecialchars($sql) . '</pre> / ' . htmlspecialchars(sqlrcur_errorMessage($cur));
if (function_exists('debug_backtrace') && $reportErr == true) { if (function_exists('debug_backtrace') && $reportErr == true) {
highlight_string(var_export(debug_backtrace(), 1)); highlight_string(var_export(debug_backtrace(), 1));
} }