From 16b69a069e64efb66d952f55ffa9b0f8db85f54d Mon Sep 17 00:00:00 2001 From: Tim Otte Date: Mon, 30 Nov 2020 10:21:10 +0100 Subject: [PATCH] Fixed sql error where column names were used instead of sql column names --- htdocs/core/class/commondocgenerator.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index f610e6bb952..78eef83b073 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -596,7 +596,7 @@ abstract class CommonDocGenerator { $columns = ""; - foreach ($extralabels as $key) + foreach ($extralabels as $key => $label) { $columns .= "$key, "; } @@ -610,7 +610,7 @@ abstract class CommonDocGenerator { $resql = $this->db->fetch_object($resql); - foreach ($extralabels as $key) + foreach ($extralabels as $key => $label) { $resarray['line_product_supplier_'.$key] = $resql->{$key}; }