Subject: | PATCH: fix when cookie is present but DB row is missing |
The following patch fixes a bug when a cookie is present but the DB row
is missing. I'll release it when I get chance.
I should also look at using "prepare_cached", like the DBI driver does.
diff -rN -u old-alphasite/perllib/CGI/Session/Driver/pure_sql.pm
new-alphasite/perllib/CGI/Session/Driver/pure_sql.pm
--- old-alphasite/perllib/CGI/Session/Driver/pure_sql.pm
2007-07-06 18:21:50.000000000 -0400
+++ new-alphasite/perllib/CGI/Session/Driver/pure_sql.pm
2007-07-06 18:21:50.000000000 -0400
@@ -106,7 +106,8 @@
return undef;
}
-
+ return 0 unless $data;
+
my $thawed_data = $SERIALIZER->thaw( $data );
unless ( defined $thawed_data ) {
return $self->set_error( "couldn't freeze data: " .
$SERIALIZER->errstr() );