From 1e986bc39a54f73d336ff8e5da0e98e13905690c Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Fri, 20 Jul 2018 11:49:38 +0200 Subject: [PATCH] Fix: Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) --- htdocs/core/class/html.form.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f782da206da..4efedc2544e 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3231,21 +3231,21 @@ class Form if ($resql && $this->db->num_rows($resql) > 0) { // Last seen cycle $ref = 0; - while ($res = $this->db->fetch_array($resql, MYSQL_NUM)) { + while ($obj = $this->db->fetch_object($resql)){ //Same company ? - if ($socid == $res[5]) { + if ($socid == $obj->fk_soc) { //Same cycle ? - if ($res[2] != $ref) { + if ($obj->situation_cycle_ref != $ref) { // Just seen this cycle - $ref = $res[2]; + $ref = $obj->situation_cycle_ref; //not final ? - if ($res[4] != 1) { + if ($obj->situation_final != 1) { //Not prov? - if (substr($res[1], 1, 4) != 'PROV') { - if ($selected == $res[0]) { - $opt .= ''; + if (substr($obj->facnumber, 1, 4) != 'PROV') { + if ($selected == $obj->situation_final) { + $opt .= ''; } else { - $opt .= ''; + $opt .= ''; } } }