From 955f14e29940eb61ffd5933a0bfd229e04b6027f Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:25:47 +0200 Subject: [PATCH 1/3] php V8 warning, no soc associated with storage --- htdocs/product/stock/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 0e7189ae038..8231be30d0c 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -447,7 +447,7 @@ if ($action == 'create') { $morehtmlref .= ''; $morehtmlref .= ''; } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, ($socid > 0 ? $socid : -1), $object->fk_project, 'none', 0, 0, 0, 1); } } else { if (!empty($object->fk_project)) { From fcc23909b32995e0c278d31bcafab6ee19e5e0bd Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:39:11 +0200 Subject: [PATCH 2/3] Update card.php --- htdocs/product/stock/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 8231be30d0c..009bc70ebb2 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -314,7 +314,7 @@ if ($action == 'create') { $langs->load('projects'); print ''.$langs->trans('Project').''; print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); - print ' '; + print ' '; print ''; } @@ -854,7 +854,7 @@ if ($action == 'create') { $langs->load('projects'); print ''.$langs->trans('Project').''; print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); - print ' id.($fac_rec ? '&fac_rec='.$fac_rec : '')).'">'; + print ' 0 ? '&socid='.$socid : "")).'">'; print ''; } From 88cab8b8e7745ee86526fc7e0bac31b9899050e9 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:41:19 +0200 Subject: [PATCH 3/3] Update card.php --- htdocs/product/stock/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 009bc70ebb2..3ef85adeb84 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -314,7 +314,7 @@ if ($action == 'create') { $langs->load('projects'); print ''.$langs->trans('Project').''; print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); - print ' '; + print ' '; print ''; }