Skip to content

[FIX] Avoid mpdf removing unexpected cache files by creating specific temp folder to it

Fabio Montefuscolo requested to merge (removed):fix-mpdf-temp-path into master

Description

For sometime, a lot of Tiki sites were having temp folder emptied in a unexpected way. Temp files like compose.phar, README and some other ones were deleted frequently and we found mpdf was doing that. This commit creates a temp folder to mpdf, so it can perform it's cache cleaning operations without damaging tempfiles and cache of other extensions.

This should be merged also on branches 18.x, 19.x, 20.x

Steps to test

  1. Enable mPDF
  2. Create any PDF
  3. Wait 3601 seconds
  4. Generate another pdf
  5. Check the temp folder

Expected result

After this MR, a new folder named mpdf will be created inside Tiki temp folder. Even after 3601 seconds, files like README, index.php and other should be intact.

Merge request reports