okay, how about this
[freeside.git] / FS / FS / UID.pm
index 613ff44..159649a 100644 (file)
@@ -114,9 +114,13 @@ sub forksuidsetup {
 
   warn "$me forksuidsetup deciding upon config system to use\n" if $DEBUG;
 
-  my $sth = $dbh->prepare("SELECT COUNT(*) FROM conf") or die $dbh->errstr;
-  $sth->execute or die $sth->errstr;
-  my $confcount = $sth->fetchrow_arrayref->[0];
+  my $confcount = 0;
+
+  my $sth = $dbh->prepare("SELECT COUNT(*) FROM conf");
+  if ( $sth ) {
+    $sth->execute or die $sth->errstr;
+    $confcount = $sth->fetchrow_arrayref->[0];
+  }
 
   if ($confcount) {
     $use_confcompat = 0;