xpdo
xpdo copied to clipboard
writeFile, do not force append mode
use the actual $mode parameter instead of forcing append mode.
This behaviour caused problems on our load balancing server configuration (2 servers accessing the same modx cache directory using NFS). It lead to corrupt cache; despite the pointer is being set to the start of the file, the cache file would contain appended content.
Tested this and this works, and as far as I can see does not break any other thing.