From 8a36353385a7eecefb2441833f33dc6eeee78f11 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 6 Jul 2015 13:18:51 +0200 Subject: [PATCH] FIX : when fetch_optionnal_by_label in Extrafields with $this->db cannot work because this->db is never instanciated --- htdocs/core/class/commondocgenerator.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index fbf5363b753..3cc8c553030 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -32,6 +32,18 @@ abstract class CommonDocGenerator { var $error=''; + public $db; + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) { + $this->db = $db; + return 1; + } /**