[interchange-cvs] interchange - jon modified lib/Vend/Table/DBI.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Mon Aug 11 21:49:00 EDT 2003
User: jon
Date: 2003-08-12 00:49:18 GMT
Modified: lib/Vend/Table DBI.pm
Log:
Prevent internal server error when $db->row($key) fetches no results.
Revision Changes Path
2.56 +3 -3 interchange/lib/Vend/Table/DBI.pm
rev 2.56, prev_rev 2.55
Index: DBI.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/DBI.pm,v
retrieving revision 2.55
retrieving revision 2.56
diff -u -u -r2.55 -r2.56
--- DBI.pm 4 Aug 2003 05:11:20 -0000 2.55
+++ DBI.pm 12 Aug 2003 00:49:18 -0000 2.56
@@ -1,6 +1,6 @@
# Vend::Table::DBI - Access a table stored in an DBI/DBD database
#
-# $Id: DBI.pm,v 2.55 2003/08/04 05:11:20 mheins Exp $
+# $Id: DBI.pm,v 2.56 2003/08/12 00:49:18 jon Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -21,7 +21,7 @@
# MA 02111-1307 USA.
package Vend::Table::DBI;
-$VERSION = substr(q$Revision: 2.55 $, 10);
+$VERSION = substr(q$Revision: 2.56 $, 10);
use strict;
@@ -1427,7 +1427,7 @@
$sth->execute($key)
or $s->log_error("%s execute error for %s: %s", 'row', $q, $DBI::errstr)
and return undef;
- return @{$sth->fetchrow_arrayref()};
+ return @{ $sth->fetchrow_arrayref() || [] };
}
sub row_hash {
More information about the interchange-cvs
mailing list