From 93ba9189d2bb6ab34e7e697823604d33333ab785 Mon Sep 17 00:00:00 2001 From: PsyCrow <93346975+PsyCrow-code@users.noreply.github.com> Date: Fri, 26 Apr 2024 19:45:32 -0600 Subject: [PATCH 1/4] FIX PHP Warning: Undefined variable $socid on line 55 (#29490) FIX PHP Warning: Undefined variable $socid on line 55 --- htdocs/fourn/paiement/info.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fourn/paiement/info.php b/htdocs/fourn/paiement/info.php index 5979c2ff1ee..18a6c69358d 100644 --- a/htdocs/fourn/paiement/info.php +++ b/htdocs/fourn/paiement/info.php @@ -46,6 +46,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ $result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); // Security check +$socid = ''; // Prevents PHP Warning: Undefined variable $socid on line 55 if ($user->socid) { $socid = $user->socid; } From c17026f6525a344183660a2824ded715019a9e73 Mon Sep 17 00:00:00 2001 From: PsyCrow <93346975+PsyCrow-code@users.noreply.github.com> Date: Fri, 26 Apr 2024 19:57:16 -0600 Subject: [PATCH 2/4] FIX: PHP Warning: Undefined array key "totalam" on line 1890 (#29489) * FIX: PHP Warning: Undefined array key "totalam" on line 1890 FIX PHP Warning: Undefined array key "totalam" on line 1890 * Update list.php * Update list.php * Update list.php --------- Co-authored-by: Laurent Destailleur --- htdocs/fourn/facture/list.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index ebb7c98bb92..bbbcc3c9eea 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1477,6 +1477,8 @@ $totalarray['val']['f.total_vat']=0; $totalarray['val']['f.total_localtax1']=0; $totalarray['val']['f.total_localtax1']=0; $totalarray['val']['f.total_ttc']=0; +$totalarray['val']['totalam']=0; +$totalarray['val']['rtp']=0; $imaxinloop = ($limit ? min($num, $limit) : $num); while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); From 0d061938ffe8581e19d8029f51d4781f12d962ff Mon Sep 17 00:00:00 2001 From: Yannis Hoareau <93135242+JustRaosha@users.noreply.github.com> Date: Sat, 27 Apr 2024 03:58:25 +0200 Subject: [PATCH 3/4] Fix: php warning 8.2 property undefined (#29465) --- htdocs/admin/holiday.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index 2678333976c..ac57eff0fb5 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -214,7 +214,7 @@ foreach ($dirmodels as $reldir) { } if ($module->isEnabled()) { - print ''.$module->nom."\n"; + print ''.$module->name."\n"; print $module->info($langs); print ''; From 74bc383fb0d15e861e8311c39a115930d6524358 Mon Sep 17 00:00:00 2001 From: Can Arslan <138895927+mc2rcanarslan@users.noreply.github.com> Date: Fri, 26 Apr 2024 19:59:37 -0600 Subject: [PATCH 4/4] FIX: TASK_CREATE Trigger (#29483) TASK_CREATE Trigger should be called after insertExtraFields (like in TASK_MODIFY trigger) otherwise TASK_CREATE Trigger will be without projet_task_extrafields record --- htdocs/projet/class/task.class.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index ce86e164aa7..bd976a51421 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -273,7 +273,14 @@ class Task extends CommonObjectLine if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task"); + // Update extrafield + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; + } + } + if (!$error) { if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_CREATE', $user); @@ -284,14 +291,6 @@ class Task extends CommonObjectLine } } - // Update extrafield - if (!$error) { - $result = $this->insertExtraFields(); - if ($result < 0) { - $error++; - } - } - // Commit or rollback if ($error) { foreach ($this->errors as $errmsg) {