Merge pull request #21488 from defrance/patch-214

php v8 fix warning
This commit is contained in:
Laurent Destailleur 2022-07-11 10:54:58 +02:00 committed by GitHub
commit 9b06e54444
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1609,7 +1609,7 @@ if ($action == 'create' && $usercancreate) {
$fk_account = $soc->fk_account;
$availability_id = 0;
$shipping_method_id = $soc->shipping_method_id;
$warehouse_id = $soc->warehouse_id;
$warehouse_id = $soc->fk_warehouse;
$demand_reason_id = $soc->demand_reason_id;
$remise_percent = $soc->remise_percent;
$remise_absolue = 0;
@ -1698,7 +1698,7 @@ if ($action == 'create' && $usercancreate) {
// Contacts (ask contact only if thirdparty already defined).
print "<tr><td>".$langs->trans("DefaultContact").'</td><td>';
print img_picto('', 'contact', 'class="pictofixedwidth"');
print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, $srccontactslist, '', 1, 'maxwidth200 widthcentpercentminusx');
print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, !empty($srccontactslist)?$srccontactslist:"", '', 1, 'maxwidth200 widthcentpercentminusx');
print '</td></tr>';
// Ligne info remises tiers
@ -1722,7 +1722,7 @@ if ($action == 'create' && $usercancreate) {
// Date delivery planned
print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>';
print '<td colspan="3">';
$date_delivery = ($date_delivery ? $date_delivery : $object->date_delivery);
$date_delivery = ($date_delivery ? $date_delivery : $object->delivery_date);
print $form->selectDate($date_delivery ? $date_delivery : -1, 'liv_', 1, 1, 1);
print "</td>\n";
print '</tr>';
@ -1803,7 +1803,12 @@ if ($action == 'create' && $usercancreate) {
}
// Other attributes
$parameters = array('objectsrc' => $objectsrc, 'socid'=>$socid);
$parameters = array();
if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
$parameters['objectsrc'] = $objectsrc;
}
$parameters['socid'] = $socid;
// Note that $action and $object may be modified by hook
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
print $hookmanager->resPrint;