dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8781a6
)
fix backtrace on SQL error
author
Antoine Musso
<hashar@users.mediawiki.org>
Fri, 13 May 2011 07:05:20 +0000
(07:05 +0000)
committer
Antoine Musso
<hashar@users.mediawiki.org>
Fri, 13 May 2011 07:05:20 +0000
(07:05 +0000)
Setting $wgShowDBErrorBacktrace did not have any effect when
throwing a DBQueryError exception. Code was missing to actually
append the backtrace to the output :)
includes/db/Database.php
patch
|
blob
|
history
diff --git
a/includes/db/Database.php
b/includes/db/Database.php
index
6560abf
..
fd79cab
100644
(file)
--- a/
includes/db/Database.php
+++ b/
includes/db/Database.php
@@
-3070,7
+3070,10
@@
class DBQueryError extends DBError {
"Query: $sql\n" .
"Function: $fname\n" .
"Error: $errno $error\n";
-
+ global $wgShowDBErrorBacktrace;
+ if( $wgShowDBErrorBacktrace ) {
+ $message .= $this->getTraceAsString();
+ }
parent::__construct( $db, $message );
$this->error = $error;