From 0c4613d6b310d6dcd8e0035bc26abce3bbd97a08 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 21 Aug 2007 07:18:29 +0200 Subject: [PATCH] Treat empty lens/model as NULL. Doesn't actually appear to happen much in practice. --- perl/Sesse/pr0n/Common.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index eff6fc1..d2dcd7d 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -265,9 +265,11 @@ sub update_image_info { $model =~ s/^\s*//; $model =~ s/\s*$//; + $model = undef if (length($model) == 0); $lens =~ s/^\s*//; $lens =~ s/\s*$//; + $lens = undef if (length($lens) == 0); # Now update the main table with the information we've got $dbh->do('UPDATE images SET width=?, height=?, date=?, model=?, lens=? WHERE id=?', -- 2.39.2