[freeside-commits] freeside/FS/FS Record.pm,1.216,1.217
Ivan,,,
ivan at wavetail.420.am
Sun Jan 23 16:22:54 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv12049
Modified Files:
Record.pm
Log Message:
scalar_sql return an empty string on no row as documented
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -w -d -r1.216 -r1.217
--- Record.pm 26 Dec 2010 04:09:24 -0000 1.216
+++ Record.pm 24 Jan 2011 00:22:51 -0000 1.217
@@ -2909,7 +2909,8 @@
my $sth = dbh->prepare($sql) or die dbh->errstr;
$sth->execute(@_)
or die "Unexpected error executing statement $sql: ". $sth->errstr;
- my $scalar = $sth->fetchrow_arrayref->[0];
+ my $row = $sth->fetchrow_arrayref or return '';
+ my $scalar = $row->[0];
defined($scalar) ? $scalar : '';
}
More information about the freeside-commits
mailing list