Try to fix warnings

This commit is contained in:
Laurent Destailleur 2023-01-08 19:28:38 +01:00
parent f130237e25
commit 027ff49100
2 changed files with 21 additions and 21 deletions

View File

@ -1108,10 +1108,10 @@ abstract class CommonDocGenerator
}
/**
* get column position rank from column key
* get column position rank from column key
*
* @param string $colKey the column key
* @return int rank on success and -1 on error
* @param string $colKey the column key
* @return int rank on success and -1 on error
*/
public function getColumnRank($colKey)
{
@ -1124,11 +1124,11 @@ abstract class CommonDocGenerator
/**
* get column position rank from column key
*
* @param string $newColKey the new column key
* @param array $defArray a single column definition array
* @param string $targetCol target column used to place the new column beside
* @param bool $insertAfterTarget insert before or after target column ?
* @return int new rank on success and -1 on error
* @param string $newColKey the new column key
* @param array $defArray a single column definition array
* @param string $targetCol target column used to place the new column beside
* @param bool $insertAfterTarget insert before or after target column ?
* @return int new rank on success and -1 on error
*/
public function insertNewColumnDef($newColKey, $defArray, $targetCol = false, $insertAfterTarget = false)
{
@ -1169,11 +1169,11 @@ abstract class CommonDocGenerator
/**
* print standard column content
*
* @param TCPDF $pdf pdf object
* @param float $curY curent Y position
* @param string $colKey the column key
* @param string $columnText column text
* @return void
* @param TCPDF $pdf pdf object
* @param float $curY curent Y position
* @param string $colKey the column key
* @param string $columnText column text
* @return int <0 if KO, >= if OK
*/
public function printStdColumnContent($pdf, &$curY, $colKey, $columnText = '')
{
@ -1191,7 +1191,7 @@ abstract class CommonDocGenerator
}
if (!$reshook) {
if (empty($columnText)) {
return;
return 0;
}
$pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position
$colDef = $this->cols[$colKey];
@ -1205,7 +1205,7 @@ abstract class CommonDocGenerator
$pdf->setCellPaddings($curentCellPaddinds['L'], $curentCellPaddinds['T'], $curentCellPaddinds['R'], $curentCellPaddinds['B']);
}
return;
return 0;
}
@ -1592,16 +1592,16 @@ abstract class CommonDocGenerator
* @param object $object common object det
* @param Translate $outputlangs langs
* @param int $hidedetails Do not show line details
* @return void
* @return int <0 if KO, >=0 if OK
*/
public function defineColumnExtrafield($object, $outputlangs, $hidedetails = 0)
{
if (!empty($hidedetails)) {
return;
return 0;
}
if (empty($object->table_element)) {
return;
return 0;
}
// Load extrafiels if not allready does
@ -1672,6 +1672,6 @@ abstract class CommonDocGenerator
}
}
return;
return 1;
}
}

View File

@ -266,9 +266,9 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
$maxRedirection--;
// TODO Use $info['local_ip'] and $info['primary_ip'] ?
continue;
} else {
$http_code = 0;
}
$http_code = 0;
} while ($http_code);
$request = curl_getinfo($ch, CURLINFO_HEADER_OUT); // Reading of request must be done after sending request