1.9 bootstrapping: apparantly, we have a dbdef at this point, but its not in the...
authorivan <ivan>
Wed, 9 Apr 2008 21:17:05 +0000 (21:17 +0000)
committerivan <ivan>
Wed, 9 Apr 2008 21:17:05 +0000 (21:17 +0000)
FS/FS/UID.pm

index bd2b70d..a94e90f 100644 (file)
@@ -114,10 +114,13 @@ sub forksuidsetup {
 
   warn "$me forksuidsetup deciding upon config system to use\n" if $DEBUG;
 
-  if ( dbdef->table('conf') ) {
+  my $sth = '';
+  if ( dbdef->table('conf')
+       and $sth = $dbh->prepare("SELECT COUNT(*) FROM conf")
+       and $sth->execute
+     )
+  {
 
-    my $sth = $dbh->prepare("SELECT COUNT(*) FROM conf") or die $dbh->errstr;
-    $sth->execute or die $sth->errstr;   
     my $confcount = $sth->fetchrow_arrayref->[0];
   
     if ($confcount) {