Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix : php 8 warnings v19.0 #30798

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion htdocs/commande/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -2272,7 +2272,7 @@
if (empty($typenArray)) {
$typenArray = $formcompany->typent_array(1);
}
print $typenArray[$obj->typent_code];
print $typenArray[$obj->typent_code]??'';
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
Expand Down Expand Up @@ -2515,14 +2515,21 @@
}

// Total margin
if (!empty($arrayfields['total_margin']['checked'])) {

Check failure on line 2518 in htdocs/commande/list.php

View workflow job for this annotation

GitHub Actions / pre-commit

Blank line found at start of control structure

print '<td class="right nowrap">'.price($marginInfo['total_margin']).'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
if (!$i) {
$totalarray['pos'][$totalarray['nbfield']] = 'total_margin';
}


if(!isset($totalarray['val']['total_margin'])){

Check failure on line 2529 in htdocs/commande/list.php

View workflow job for this annotation

GitHub Actions / phpcs

Expected 1 space(s) after IF keyword; 0 found

Check failure on line 2529 in htdocs/commande/list.php

View workflow job for this annotation

GitHub Actions / phpcs

Expected 1 space(s) after closing parenthesis; found 0

Check failure on line 2529 in htdocs/commande/list.php

View workflow job for this annotation

GitHub Actions / pre-commit

Expected 1 space after IF keyword; 0 found

Check failure on line 2529 in htdocs/commande/list.php

View workflow job for this annotation

GitHub Actions / pre-commit

Expected 1 space after closing parenthesis; found 0
$totalarray['val']['total_margin'] = 0;
}

$totalarray['val']['total_margin'] += $marginInfo['total_margin'];
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/html.form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -8145,7 +8145,7 @@ public function selectForForms($objectdesc, $htmlname, $preSelectedValue, $showe

$oldValueForShowOnCombobox = 0;
foreach ($objecttmp->fields as $fieldK => $fielV) {
if (!$fielV['showoncombobox'] || empty($objecttmp->$fieldK)) continue;
if (!array_key_exists('showoncombobox', $fielV) || !$fielV['showoncombobox'] || empty($objecttmp->$fieldK)) continue;

if (!$oldValueForShowOnCombobox) {
$selected_input_value = '';
Expand Down
Loading