[wellwell/interchange6: 1/5] uid is not guaranteed to be numeric, so quote it

Stefan Hornburg interchange-cvs at icdevgroup.org
Fri Mar 3 07:53:19 UTC 2017


commit 4aec4084bc3c5df6dea40026a012d9f95b5b6ec3
Author: Marco Pessotto <melmothx at gmail.com>
Date:   Thu Nov 21 12:14:13 2013 +0100

    uid is not guaranteed to be numeric, so quote it

 lib/WellWell/DatabaseCart.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/WellWell/DatabaseCart.pm b/lib/WellWell/DatabaseCart.pm
index 5ac63d5..ac42335 100644
--- a/lib/WellWell/DatabaseCart.pm
+++ b/lib/WellWell/DatabaseCart.pm
@@ -131,7 +131,7 @@ sub get_cart_by_name {
 
 	$db_carts = database_exists_ref('carts');
 
-	$set = $db_carts->query(q{select code from carts where name = '%s' and uid = %s},
+	$set = $db_carts->query(q{select code from carts where name = '%s' and uid = '%s'},
 							$name, $uid);
 
 	if (@$set) {



More information about the interchange-cvs mailing list