A liability agreement entered into by a completely incapacitated person will be null and void. However, in the case of a partially incapacitated person, the decision is left in the hands of the statutory representative, who has the right to either confirm it or reject it. In her article entitled "Who is liable for the debts of a mentally ill person? Incapacitation and debt" Katarzyna Domańska-Mołdawa comments on the problem in Bankier.pl.
The article is available here.