Merge "includes/api: Replace implicitly-Bugzilla bug numbers with Phab ones"
[lhc/web/wiklou.git] / includes / api / ApiMain.php
index 5d0d4b1..6d76f8c 100644 (file)
@@ -1116,7 +1116,9 @@ class ApiMain extends ApiBase {
                                )
                        );
                } else {
-                       if ( $config->get( 'ShowExceptionDetails' ) ) {
+                       if ( $config->get( 'ShowExceptionDetails' ) &&
+                               ( !$e instanceof DBError || $config->get( 'ShowDBErrorBacktrace' ) )
+                       ) {
                                $result->addContentValue(
                                        $path,
                                        'trace',