Skip to content

Commit 96f16fd

Browse files
committed
Merge pull request php-debugbar#199 from snowair/snowair-patch-1
phpdebugbar-widgets-error is a block element
2 parents 0c955f9 + 4ffaf07 commit 96f16fd

File tree

1 file changed

+5
-4
lines changed
  • src/DebugBar/Resources/widgets/sqlqueries

1 file changed

+5
-4
lines changed

src/DebugBar/Resources/widgets/sqlqueries/widget.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@
4040
if (stmt.memory_str) {
4141
$('<span title="Memory usage" />').addClass(csscls('memory')).text(stmt.memory_str).appendTo(li);
4242
}
43-
if (typeof(stmt.is_success) != 'undefined' && !stmt.is_success) {
44-
li.addClass(csscls('error'));
45-
li.append($('<span />').addClass(csscls('error')).text("[" + stmt.error_code + "] " + stmt.error_message));
46-
} else if (typeof(stmt.row_count) != 'undefined') {
43+
if (typeof(stmt.row_count) != 'undefined') {
4744
$('<span title="Row count" />').addClass(csscls('row-count')).text(stmt.row_count).appendTo(li);
4845
}
4946
if (typeof(stmt.stmt_id) != 'undefined' && stmt.stmt_id) {
@@ -66,6 +63,10 @@
6663
}
6764
}
6865
}
66+
if (typeof(stmt.is_success) != 'undefined' && !stmt.is_success) {
67+
li.addClass(csscls('error'));
68+
li.append($('<span />').addClass(csscls('error')).text("[" + stmt.error_code + "] " + stmt.error_message));
69+
}
6970
if (stmt.params && !$.isEmptyObject(stmt.params)) {
7071
var table = $('<table><tr><th colspan="2">Params</th></tr></table>').addClass(csscls('params')).appendTo(li);
7172
for (var key in stmt.params) {

0 commit comments

Comments
 (0)