Merge pull request #20507 from FHenry/14_fix_action_reminders

FIX on update with action reminder in future there is user key error
This commit is contained in:
Laurent Destailleur 2022-04-01 13:21:05 +02:00 committed by GitHub
commit 86e9a24eb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -659,7 +659,7 @@ if (empty($reshook) && $action == 'update') {
$categories = GETPOST('categories', 'array');
$object->setCategories($categories);
$object->loadReminders();
$object->loadReminders($remindertype, 0, false);
if (!empty($object->reminders) && $object->datep > dol_now()) {
foreach ($object->reminders as $reminder) {
$reminder->delete($user);