From 6c30a77544afc8854887748d6a7b59d8d7d05da6 Mon Sep 17 00:00:00 2001 From: konrad Date: Fri, 8 Jan 2010 18:21:57 +0000 Subject: [PATCH] fix: orderByBarcode - return order object only if found git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@410 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- www/inc/wext/order.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/www/inc/wext/order.php b/www/inc/wext/order.php index d2cc241..0033bd3 100644 --- a/www/inc/wext/order.php +++ b/www/inc/wext/order.php @@ -156,7 +156,7 @@ class WOOrder extends WOOrderAbstract if(count($res)<1) $res=$db->select("voucher","orderid","voucherid=".$db->escapeString($trans->getbarcode())); //find order - if(count($res)>=0) + if(count($res)>0) $trans->setorder(WOOrder::fromTableorder(WTorder::getFromDB($res[0]["orderid"]))); } -- 1.7.2.5