Hi.
In saveAffectationReplacement.php the variable $idTeam seems to be undefined.
In replaceAffectationFormField there is no hidden team field (as is,e.g, in dialogAffectation) and no Get parameter appears in request for this item.
Furthermore, if you assume $idTeam true and parameter not set in Request, the exception will be raised by the next access to $_REQUEST array.
You're right.
It seems to be a bad copy/paste issue 🙁 that exists since firts version of file (december 2015)
Fixed !
Thanks for reporting