浏览代码

Fix scrutinizer

Laurent Destailleur 3 年之前
父节点
当前提交
177e8c17fb

+ 1 - 1
htdocs/comm/action/class/actioncomm.class.php

@@ -1621,7 +1621,7 @@ class ActionComm extends CommonObject
 				$label = $langs->trans("ShowAction");
 				$linkclose .= ' alt="'.dol_escape_htmltag($tooltip, 1).'"';
 			}
-			$linkclose .= ' title="'.dol_escape_htmltag($tooltip, 1, 0, 0, '', 1).'"';
+			$linkclose .= ' title="'.dol_escape_htmltag($tooltip, 1, 0, '', 1).'"';
 			$linkclose .= ' class="'.$classname.' classfortooltip"';
 			/*
 			$hookmanager->initHooks(array('actiondao'));

+ 1 - 1
htdocs/comm/action/index.php

@@ -110,7 +110,7 @@ $week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
 $day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
 $pid = GETPOST("search_projectid", "int", 3) ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
 $status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo'
-$type = GETPOSTISSET("search_type", 'aZ09') ? GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09');
+$type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09');
 $maxprint = GETPOSTISSET("maxprint") ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW;
 $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
 

+ 1 - 1
htdocs/core/class/commonobject.class.php

@@ -201,7 +201,7 @@ abstract class CommonObject
 	public $user;
 
 	/**
-	 * @var string 	The type of originating object ('commande', 'facture', ...)
+	 * @var string 	The type of originating object ('commande', 'facture', ...). Note: on some object this field is called $origin_type
 	 * @see fetch_origin()
 	 */
 	public $origin;

+ 1 - 1
htdocs/core/class/html.form.class.php

@@ -7621,7 +7621,7 @@ class Form
 		if (!empty($objecttmp->fields)) {	// For object that declare it, it is better to use declared fields (like societe, contact, ...)
 			$tmpfieldstoshow = '';
 			foreach ($objecttmp->fields as $key => $val) {
-				if (!dol_eval($val['enabled'], 1, 1, 1, '1')) {
+				if (!dol_eval($val['enabled'], 1, 1, '1')) {
 					continue;
 				}
 				if (!empty($val['showoncombobox'])) {

+ 1 - 1
htdocs/core/class/utils.class.php

@@ -342,7 +342,7 @@ class Utils
 
 			$handle = '';
 
-			$lowmemorydump = GETPOSTISSET("lowmemorydump", "alpha") ? GETPOST("lowmemorydump") : getDolGlobalString('MAIN_LOW_MEMORY_DUMP');
+			$lowmemorydump = GETPOSTISSET("lowmemorydump") ? GETPOST("lowmemorydump") : getDolGlobalString('MAIN_LOW_MEMORY_DUMP');
 
 			// Start call method to execute dump
 			$fullcommandcrypted = $command." ".$paramcrypted." 2>&1";

+ 1 - 1
htdocs/core/modules/expedition/doc/pdf_espadon.modules.php

@@ -120,7 +120,7 @@ class pdf_espadon extends ModelePdfExpedition
 	 *
 	 *	@param	DoliDB	$db		Database handler
 	 */
-	public function __construct($db)
+	public function __construct(DoliDB $db)
 	{
 		global $conf, $langs, $mysoc;
 

+ 1 - 1
htdocs/core/modules/expedition/doc/pdf_merou.modules.php

@@ -121,7 +121,7 @@ class pdf_merou extends ModelePdfExpedition
 	 *
 	 *  @param		DoliDB		$db      Database handler
 	 */
-	public function __construct($db = 0)
+	public function __construct(DoliDB $db)
 	{
 		global $conf, $langs, $mysoc;
 

+ 1 - 1
htdocs/core/modules/expedition/doc/pdf_rouget.modules.php

@@ -121,7 +121,7 @@ class pdf_rouget extends ModelePdfExpedition
 	 *
 	 *	@param	DoliDB	$db		Database handler
 	 */
-	public function __construct($db = 0)
+	public function __construct(DoliDB $db)
 	{
 		global $conf, $langs, $mysoc;
 

+ 1 - 1
htdocs/core/modules/reception/doc/pdf_squille.modules.php

@@ -44,7 +44,7 @@ class pdf_squille extends ModelePdfReception
 	 *
 	 *	@param	DoliDB	$db		Database handler
 	 */
-	public function __construct($db = 0)
+	public function __construct(DoliDB $db)
 	{
 		global $conf, $langs, $mysoc;
 

+ 1 - 1
htdocs/expedition/class/expedition.class.php

@@ -752,7 +752,7 @@ class Expedition extends CommonObject
 
 					//var_dump($this->lines[$i]);
 					$mouvS = new MouvementStock($this->db);
-					$mouvS->origin = dol_clone($this, 1);
+					//$mouvS->origin = dol_clone($this, 1);
 					$mouvS->setOrigin($this->element, $this->id);
 
 					if (empty($obj->edbrowid)) {

+ 7 - 0
htdocs/fourn/class/fournisseur.facture-rec.class.php

@@ -127,6 +127,13 @@ class FactureFournisseurRec extends CommonInvoice
 
 	public $model_pdf;
 
+	/**
+	 * Invoice lines
+	 * @var FactureFournisseurLigneRec[]
+	 */
+	public $lines = array();
+
+
 	/* Override fields in CommonObject
 	public $entity;
 	public $date_creation;

+ 3 - 3
htdocs/install/fileconf.php

@@ -143,7 +143,7 @@ if (!empty($force_install_message)) {
 		<td class="label"><label for="main_dir"><b><?php print $langs->trans("WebPagesDirectory"); ?></b></label></td>
 <?php
 if (empty($dolibarr_main_document_root)) {
-	$dolibarr_main_document_root = GETPOSTISSET('main_dir', 'alpha') ? GETPOST('main_dir') : detect_dolibarr_main_document_root();
+	$dolibarr_main_document_root = GETPOSTISSET('main_dir') ? GETPOST('main_dir') : detect_dolibarr_main_document_root();
 }
 ?>
 		<td class="label">
@@ -178,7 +178,7 @@ if (!empty($force_install_noedit)) {
 			$dolibarr_main_data_root = @$force_install_main_data_root;
 		}
 		if (empty($dolibarr_main_data_root)) {
-			$dolibarr_main_data_root = GETPOSTISSET('main_data_dir', 'alpha') ? GETPOST('main_data_dir') : detect_dolibarr_main_data_root($dolibarr_main_document_root);
+			$dolibarr_main_data_root = GETPOSTISSET('main_data_dir') ? GETPOST('main_data_dir') : detect_dolibarr_main_data_root($dolibarr_main_document_root);
 		}
 		?>
 		<td class="label">
@@ -207,7 +207,7 @@ if (!empty($force_install_noedit)) {
 	<!-- Root URL $dolibarr_main_url_root -->
 	<?php
 	if (empty($dolibarr_main_url_root)) {
-		$dolibarr_main_url_root = GETPOSTISSET('main_url', 'alpha') ? GETPOST('main_url') : detect_dolibarr_main_url_root();
+		$dolibarr_main_url_root = GETPOSTISSET('main_url') ? GETPOST('main_url') : detect_dolibarr_main_url_root();
 	}
 	?>
 	<tr>

+ 1 - 1
htdocs/product/card.php

@@ -1461,7 +1461,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
 		if ($type == 1) {
 			print '<tr><td>'.$langs->trans("Duration").'</td><td>';
 			print '<input name="duration_value" size="4" value="'.GETPOST('duration_value', 'int').'">';
-			print $formproduct->selectMeasuringUnits("duration_unit", "time", (GETPOSTISSET('duration_value') ? GETPOSTISSET('duration_value', 'alpha') : 'h'), 0, 1);
+			print $formproduct->selectMeasuringUnits("duration_unit", "time", (GETPOSTISSET('duration_value') ? GETPOST('duration_value', 'alpha') : 'h'), 0, 1);
 
 			// Mandatory period
 			print ' &nbsp; &nbsp; &nbsp; ';

+ 4 - 3
htdocs/societe/class/societe.class.php

@@ -504,18 +504,19 @@ class Societe extends CommonObject
 
 	/**
 	 * Date of last update
-	 * @var string
+	 * @var integer|string
 	 */
 	public $date_modification;
 
 	/**
 	 * User that made last update
-	 * @var string
+	 * @var User
 	 */
 	public $user_modification;
 
 	/**
-	 * @var integer|string date_creation
+	 * Date of creation
+	 * @var integer|string
 	 */
 	public $date_creation;