diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 7eeda32dfed..8f23d472dbb 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -528,7 +528,12 @@ $newcardbutton = ''; if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { $tmpforcreatebutton = dol_getdate(dol_now(), true); - $newparam = 'month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; + if(isset($newparam)) { + $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; + } + else { + $newparam = 'month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; + } //$param='month='.$monthshown.'&year='.$year; $hourminsec = '100000';