diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 2c094ea56c7..f07b82a4c74 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -7187,7 +7187,7 @@ class Form
* @param int $limit Limit on number of returned lines
* @param int $status Ticket status
* @param string $selected_input_value Value of preselected input text (for use with ajax)
- * @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after)
+ * @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon before and placeholder, 3 search icon after)
* @param array $ajaxoptions Options for ajax_autocompleter
* @param int $socid Thirdparty Id (to get also price dedicated to this customer)
* @param string $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text.
diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php
index 6b973d89887..b8202b8e361 100644
--- a/htdocs/core/lib/images.lib.php
+++ b/htdocs/core/lib/images.lib.php
@@ -590,6 +590,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small',
break;
}
+ // Before PHP8, img was a resource, With PHP8, it is a GdImage
if (!is_resource($img) && !($img instanceof \GdImage)) {
dol_syslog('Failed to detect type of image. We found infoImg[2]='.$infoImg[2], LOG_WARNING);
return 0;
diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php
index 3d6c0868f01..f77dd5638f7 100644
--- a/htdocs/fourn/class/fournisseur.facture-rec.class.php
+++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php
@@ -1031,29 +1031,29 @@ class FactureFournisseurRec extends CommonInvoice
}
/**
- * Update a line to supplier invoice template
+ * Update a line to supplier invoice template
*
- * @param $rowid ID
- * @param int $fk_product Product/Service ID predefined
- * @param $ref Ref
- * @param string $label Label of the line
- * @param string $desc Description de la ligne
- * @param double $pu_ht Prix unitaire HT (> 0 even for credit note)
- * @param double $qty Quantity
- * @param int $remise_percent Percentage discount of the line
- * @param double $txtva Taux de tva force, sinon -1
- * @param int $txlocaltax1 Local tax 1 rate (deprecated)
- * @param int $txlocaltax2 Local tax 2 rate (deprecated)
- * @param string $price_base_type HT or TTC
- * @param int $type Type of line (0=product, 1=service)
- * @param int $date_start Date start
- * @param int $date_end Date end
- * @param int $info_bits Bits of type of lines
- * @param int $special_code Special code
- * @param int $rang Position of line
- * @param string $fk_unit Unit
- * @param int $pu_ht_devise Unit price in currency
- * @return int <0 if KO, Id of line if OK
+ * @param int $rowid ID
+ * @param int $fk_product Product/Service ID predefined
+ * @param string $ref Ref
+ * @param string $label Label of the line
+ * @param string $desc Description de la ligne
+ * @param double $pu_ht Prix unitaire HT (> 0 even for credit note)
+ * @param double $qty Quantity
+ * @param int $remise_percent Percentage discount of the line
+ * @param double $txtva Taux de tva force, sinon -1
+ * @param int $txlocaltax1 Local tax 1 rate (deprecated)
+ * @param int $txlocaltax2 Local tax 2 rate (deprecated)
+ * @param string $price_base_type HT or TTC
+ * @param int $type Type of line (0=product, 1=service)
+ * @param int $date_start Date start
+ * @param int $date_end Date end
+ * @param int $info_bits Bits of type of lines
+ * @param int $special_code Special code
+ * @param int $rang Position of line
+ * @param string $fk_unit Unit
+ * @param int $pu_ht_devise Unit price in currency
+ * @return int <0 if KO, Id of line if OK
* @throws Exception
*/
public function updateline($rowid, $fk_product, $ref, $label, $desc, $pu_ht, $qty, $remise_percent, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $type = 0, $date_start = 0, $date_end = 0, $info_bits = 0, $special_code = 0, $rang = -1, $fk_unit = null, $pu_ht_devise = 0)
diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php
index 724c14b93c0..ececc70b4f1 100644
--- a/htdocs/hrm/class/skill.class.php
+++ b/htdocs/hrm/class/skill.class.php
@@ -977,7 +977,7 @@ class Skill extends CommonObject
{
$this->lines = array();
- $objectline = new SkillLine($this->db);
+ $objectline = new Skilldet($this->db);
$result = $objectline->fetchAll('ASC', 'rankorder', 0, 0, array('customsql'=>'fk_skill = '.$this->id));
if (is_numeric($result)) {
diff --git a/htdocs/hrm/class/skilldet.class.php b/htdocs/hrm/class/skilldet.class.php
index 5e2da1ba7aa..ac91e2ef21a 100644
--- a/htdocs/hrm/class/skilldet.class.php
+++ b/htdocs/hrm/class/skilldet.class.php
@@ -882,27 +882,6 @@ class Skilldet extends CommonObject
$this->initAsSpecimenCommon();
}
- /**
- * Create an array of lines
- *
- * @return array|int array of lines if OK, <0 if KO
- */
- public function getLinesArray()
- {
- $this->lines = array();
-
- $objectline = new SkilldetLine($this->db);
- $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_skilldet = '.$this->id));
-
- if (is_numeric($result)) {
- $this->error = $this->error;
- $this->errors = $this->errors;
- return $result;
- } else {
- $this->lines = $result;
- return $this->lines;
- }
- }
/**
* Returns the reference to the following non used object depending on the active numbering module.
diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php
index eb93208040b..aa1d70b430f 100644
--- a/htdocs/hrm/class/skillrank.class.php
+++ b/htdocs/hrm/class/skillrank.class.php
@@ -930,6 +930,7 @@ class SkillRank extends CommonObject
{
$this->lines = array();
+ /*
$objectline = new SkillRankLine($this->db);
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_skillrank = '.((int) $this->id)));
@@ -941,6 +942,7 @@ class SkillRank extends CommonObject
$this->lines = $result;
return $this->lines;
}
+ */
}
/**
diff --git a/htdocs/modulebuilder/template/class/api_mymodule.class.php b/htdocs/modulebuilder/template/class/api_mymodule.class.php
index 4cb50c8de2f..04bf641930d 100644
--- a/htdocs/modulebuilder/template/class/api_mymodule.class.php
+++ b/htdocs/modulebuilder/template/class/api_mymodule.class.php
@@ -49,7 +49,7 @@ class MyModuleApi extends DolibarrApi
*/
public function __construct()
{
- global $db, $conf;
+ global $db;
$this->db = $db;
$this->myobject = new MyObject($this->db);
}
diff --git a/htdocs/recruitment/class/api_recruitment.class.php b/htdocs/recruitment/class/api_recruitment.class.php
index e0c2cb5da11..ff6f3c3d65a 100644
--- a/htdocs/recruitment/class/api_recruitment.class.php
+++ b/htdocs/recruitment/class/api_recruitment.class.php
@@ -37,11 +37,15 @@ dol_include_once('/recruitment/class/recruitmentcandidature.class.php');
class Recruitment extends DolibarrApi
{
/**
- * @var jobposition $jobposition {@type jobposition}
+ * @var RecruitmentJobPosition $jobposition {@type RecruitmentJobPosition}
*/
public $jobposition;
+ /**
+ * @var RecruitmentCandidature $candidature {@type RecruitmentCandidature}
+ */
public $candidature;
+
/**
* Constructor
*
@@ -50,12 +54,13 @@ class Recruitment extends DolibarrApi
*/
public function __construct()
{
- global $db, $conf;
+ global $db;
$this->db = $db;
$this->jobposition = new RecruitmentJobPosition($this->db);
$this->candidature = new RecruitmentCandidature($this->db);
}
+
/**
* Get properties of a jobposition object
*