diff options
author | ivan <ivan> | 2010-08-04 18:50:11 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-08-04 18:50:11 +0000 |
commit | cf0f715a49586ee141193605e6dbf5ae6685cd58 (patch) | |
tree | 2bbacf05e2870adb17eaad7a52879a7e2991a5ca | |
parent | 44e07950608338840d5142319f518448e5def7d9 (diff) |
fix scalar_sql not to return empty string for zero
-rw-r--r-- | FS/FS/Record.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 94f69b126..f2d18d9ff 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -2807,7 +2807,8 @@ sub scalar_sql { my $sth = dbh->prepare($sql) or die dbh->errstr; $sth->execute or die "Unexpected error executing statement $sql: ". $sth->errstr; - $sth->fetchrow_arrayref->[0] || ''; + my $scalar = $sth->fetchrow_arrayref->[0]; + defined($scalar) ? $scalar : ''; } =back |