From eb642cb85e524eae60d81832c3706ad2debc9d86 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Tue, 19 Aug 2014 04:40:43 +0200 Subject: [PATCH] Ensure only parameters are added to SQL widget and no prototype functions. When an AJAX result is being processed, the parameters will get added including prototype functions otherwise. --- src/DebugBar/Resources/widgets/sqlqueries/widget.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/DebugBar/Resources/widgets/sqlqueries/widget.js b/src/DebugBar/Resources/widgets/sqlqueries/widget.js index f849fee..80be93b 100644 --- a/src/DebugBar/Resources/widgets/sqlqueries/widget.js +++ b/src/DebugBar/Resources/widgets/sqlqueries/widget.js @@ -35,8 +35,10 @@ if (stmt.params && !$.isEmptyObject(stmt.params)) { var table = $('
Params
').addClass(csscls('params')).appendTo(li); for (var key in stmt.params) { - table.append('' + key + '' + stmt.params[key] + ''); + if (typeof stmt.params[key] !== 'function') { + table.append('' + key + '' + stmt.params[key] + ''); + } } li.css('cursor', 'pointer').click(function() { if (table.is(':visible')) {