diff --git a/lib/WebGUI/Session/ErrorHandler.pm b/lib/WebGUI/Session/ErrorHandler.pm index 1e94545bf..c438feb59 100644 --- a/lib/WebGUI/Session/ErrorHandler.pm +++ b/lib/WebGUI/Session/ErrorHandler.pm @@ -330,8 +330,9 @@ sub query { my $placeholders = shift; $self->{_queryCount}++; my $plac; - if (defined $placeholders and ref $placeholders eq "ARRAY" && scalar(@{$placeholders})) { - $plac = "\n with placeholders: " . JSON->new->encode($placeholders); + if (defined $placeholders and ref $placeholders eq "ARRAY" && scalar(@$placeholders)) { + my @placeholders = map {ref $_ ? "$_" : $_} @$placeholders; # stringify objects + $plac = "\n with placeholders: " . JSON->new->encode(\@placeholders); } else { $plac = ''; diff --git a/lib/WebGUI/Session/Form.pm b/lib/WebGUI/Session/Form.pm index d837a371f..07c58d81c 100644 --- a/lib/WebGUI/Session/Form.pm +++ b/lib/WebGUI/Session/Form.pm @@ -16,7 +16,7 @@ package WebGUI::Session::Form; use strict qw(vars subs); use WebGUI::HTML; -use Encode; +use Encode (); use base 'WebGUI::FormValidator'; =head1 NAME