From: Joe Date: Tue, 28 Jun 2022 08:30:24 +0000 (+0200) Subject: Bug 5599: Generating an EAN-8 Barcode throws an error "Trying to access array offset... X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=b2460e88c7d050659179d7a6e24a10b0616d3cac;p=fa-stable.git Bug 5599: Generating an EAN-8 Barcode throws an error "Trying to access array offset on value of type bool". Fixed. --- diff --git a/inventory/manage/items.php b/inventory/manage/items.php index fe4e82b1..54978382 100644 --- a/inventory/manage/items.php +++ b/inventory/manage/items.php @@ -686,7 +686,7 @@ function generateBarcode() { $query = "SELECT stock_id FROM ".TB_PREF."stock_master WHERE stock_id='" . $tmpBarcodeID . "'"; $arr_stock = db_fetch(db_query($query)); - if ( !$arr_stock['stock_id'] ) { + if ( !$arr_stock || !$arr_stock['stock_id'] ) { return $tmpBarcodeID; } $tmpBarcodeID = "";