Invoice in archive is empty (zero bytes) - T2

Since the original topic is closed and I can’t continue there, I’m opening this one.

This bug persists in v1.4.4 although it appears as a bugfix in IP-308. So I’m posting here the solution that Pitma came up with, for anyone affected.

Open file /application/modules/invoices/controllers/invoices.php and replace the two lines below:

header(‘Content-Disposition: attachment; filename="’ . $invoice . ‘"’);
readfile(’./uploads/archive/’ . $invoice);


header(‘Content-Disposition: attachment; filename=’.basename($invoice));
readfile(’./uploads/archive/’ . urldecode(basename($invoice)));

P.S. If someone could join the two topics, it would be nice.