Skip to content

Commit

Permalink
Merge pull request #688 from bldewolf/ignore-bad-answers-from-db
Browse files Browse the repository at this point in the history
handle corrupt previous answers in decodeAnswers
  • Loading branch information
goehle committed Mar 9, 2016
2 parents 6cf2457 + f25b571 commit 6ecc4ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/WeBWorK/Utils.pm
Expand Up @@ -877,7 +877,7 @@ sub decodeAnswers($) {
my $serialized = shift;
return unless defined $serialized and $serialized;
my $array_ref = eval{ Storable::thaw($serialized) };
if ($@) {
if ($@ or !defined $array_ref) {
# My hope is that this next warning is no longer needed since there are few legacy base64 days and the fix seems transparent.
# warn "problem fetching answers -- possibly left over from base64 days. Not to worry -- press preview or submit and this will go away permanently for this question. $@";
return ();
Expand Down

0 comments on commit 6ecc4ad

Please sign in to comment.