diff extra/soundsoftware/SoundSoftware.pm @ 301:6d3f8aeb51b7 feature_74

Fix failure to handle uninitialised values; add salting version
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 25 Mar 2011 14:31:17 +0000
parents 034e9b00b341
children a2192366d309
line wrap: on
line diff
--- a/extra/soundsoftware/SoundSoftware.pm	Fri Mar 25 13:28:44 2011 +0000
+++ b/extra/soundsoftware/SoundSoftware.pm	Fri Mar 25 14:31:17 2011 +0000
@@ -295,7 +295,7 @@
     $sth->execute($project_id);
     my $ret = 0; # nonexistent
     if (my @row = $sth->fetchrow_array) {
-        if ($row[0] eq "1" || $row[0] eq "t") {
+        if (defined($row[0]) && ($row[0] eq "1" || $row[0] eq "t")) {
             $ret = 1; # read-only (i.e. external)
         } else {
             $ret = 0; # read-write