From f2e4ac5bfecb3e33f373cc70b1e515b5c587d825 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 11 Nov 2025 20:18:00 +0100 Subject: [PATCH] FIX use $this->db instead $db (#36219) * FIX use $this->db instead $db * FIX use $db with static function --------- Co-authored-by: Laurent Destailleur --- htdocs/core/class/html.form.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 08124d3a22a..35cfdfbd4f3 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3041,7 +3041,6 @@ class Form public function select_bom($selected = '', $htmlname = 'bom_id', $limit = 0, $status = 1, $type = 0, $showempty = '1', $morecss = '', $nooutput = '', $forcecombo = 0, $TProducts = []) { // phpcs:enable - global $db; require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; @@ -3072,7 +3071,7 @@ class Form if (!empty($limit)) { $sql .= ' LIMIT ' . (int) $limit; } - $resql = $db->query($sql); + $resql = $this->db->query($sql); if ($resql) { if ($showempty) { $out .= '