The error was in a hole other part of the script, that haven't throwed errors before. FPDF already uses $links
, and the my script is based on a custom extension of the FPDF class. So I overwrote it - but I don't know why the error didn't threw errors before.
Anyways, it works now; I changed my own $pdf->links
to $pdf->mylinks
:).