Skip to content

Commit 5d08b31

Browse files
committed
Merge pull request php-debugbar#150 from discordier/fix-sql-params
Ensure only parameters are added to SQL widget and no prototype functions.
2 parents 9a5951e + eb642cb commit 5d08b31

File tree

1 file changed

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

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@
3535
if (stmt.params && !$.isEmptyObject(stmt.params)) {
3636
var table = $('<table><tr><th colspan="2">Params</th></tr></table>').addClass(csscls('params')).appendTo(li);
3737
for (var key in stmt.params) {
38-
table.append('<tr><td class="' + csscls('name') + '">' + key + '</td><td class="' + csscls('value') +
39-
'">' + stmt.params[key] + '</td></tr>');
38+
if (typeof stmt.params[key] !== 'function') {
39+
table.append('<tr><td class="' + csscls('name') + '">' + key + '</td><td class="' + csscls('value') +
40+
'">' + stmt.params[key] + '</td></tr>');
41+
}
4042
}
4143
li.css('cursor', 'pointer').click(function() {
4244
if (table.is(':visible')) {

0 commit comments

Comments
 (0)