[interchange-cvs] interchange - racke modified lib/Vend/Table/DBI.pm

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Fri Nov 2 03:30:01 2001


User:      racke
Date:      2001-11-02 08:29:55 GMT
Modified:  lib/Vend/Table Tag: STABLE_4_8-branch DBI.pm
Log:
fixed very subtle bug where you end up with queries like
select sku,name from products where class='Lingerie' and category like '0ancer%' order by name limit 6
instead of
select sku,name from products where class='Lingerie' and category like '%Dancer%' order by name limit 6
when called from embedded Perl
because Vend::Util::errmsg does the same expansion even without arguments it
was quite hard to find this thingy

Revision  Changes    Path
No                   revision



No                   revision



2.0.2.2   +3 -3      interchange/lib/Vend/Table/DBI.pm


rev 2.0.2.2, prev_rev 2.0.2.1
Index: DBI.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Table/DBI.pm,v
retrieving revision 2.0.2.1
retrieving revision 2.0.2.2
diff -u -r2.0.2.1 -r2.0.2.2
--- DBI.pm	2001/10/18 05:30:04	2.0.2.1
+++ DBI.pm	2001/11/02 08:29:54	2.0.2.2
@@ -1,6 +1,6 @@
 # Vend::Table::DBI - Access a table stored in an DBI/DBD database
 #
-# $Id: DBI.pm,v 2.0.2.1 2001/10/18 05:30:04 mheins Exp $
+# $Id: DBI.pm,v 2.0.2.2 2001/11/02 08:29:54 racke Exp $
 #
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -20,7 +20,7 @@
 # MA  02111-1307  USA.
 
 package Vend::Table::DBI;
-$VERSION = substr(q$Revision: 2.0.2.1 $, 10);
+$VERSION = substr(q$Revision: 2.0.2.2 $, 10);
 
 use strict;
 
@@ -1504,7 +1504,7 @@
     my($s, $opt, $text, @arg) = @_;
 
     if(! CORE::ref($opt)) {
-        unshift @arg, $text;
+        unshift @arg, $text if defined $text;
         $text = $opt;
         $opt = {};
     }