diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index e142e5c8d61..abf30f2f3ee 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -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; } } diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index 3d1f7157e83..4434855da2d 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -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