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

@ -1173,7 +1173,7 @@ abstract class CommonDocGenerator
* @param float $curY curent Y position * @param float $curY curent Y position
* @param string $colKey the column key * @param string $colKey the column key
* @param string $columnText column text * @param string $columnText column text
* @return void * @return int <0 if KO, >= if OK
*/ */
public function printStdColumnContent($pdf, &$curY, $colKey, $columnText = '') public function printStdColumnContent($pdf, &$curY, $colKey, $columnText = '')
{ {
@ -1191,7 +1191,7 @@ abstract class CommonDocGenerator
} }
if (!$reshook) { if (!$reshook) {
if (empty($columnText)) { if (empty($columnText)) {
return; return 0;
} }
$pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position $pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position
$colDef = $this->cols[$colKey]; $colDef = $this->cols[$colKey];
@ -1205,7 +1205,7 @@ abstract class CommonDocGenerator
$pdf->setCellPaddings($curentCellPaddinds['L'], $curentCellPaddinds['T'], $curentCellPaddinds['R'], $curentCellPaddinds['B']); $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 object $object common object det
* @param Translate $outputlangs langs * @param Translate $outputlangs langs
* @param int $hidedetails Do not show line details * @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) public function defineColumnExtrafield($object, $outputlangs, $hidedetails = 0)
{ {
if (!empty($hidedetails)) { if (!empty($hidedetails)) {
return; return 0;
} }
if (empty($object->table_element)) { if (empty($object->table_element)) {
return; return 0;
} }
// Load extrafiels if not allready does // 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--; $maxRedirection--;
// TODO Use $info['local_ip'] and $info['primary_ip'] ? // TODO Use $info['local_ip'] and $info['primary_ip'] ?
continue; continue;
} else {
$http_code = 0;
} }
$http_code = 0;
} while ($http_code); } while ($http_code);
$request = curl_getinfo($ch, CURLINFO_HEADER_OUT); // Reading of request must be done after sending request $request = curl_getinfo($ch, CURLINFO_HEADER_OUT); // Reading of request must be done after sending request