Browse Source

FIX : when fetch_optionnal_by_label in Extrafields with $this->db cannot
work because this->db is never instanciated

Florian HENRY 10 years ago
parent
commit
8a36353385
1 changed files with 12 additions and 0 deletions
  1. 12 0
      htdocs/core/class/commondocgenerator.class.php

+ 12 - 0
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;
+	}
 
 
     /**