keycdn / cache-enabler

A lightweight caching plugin for WordPress that makes your website faster by generating static HTML files.
https://wordpress.org/plugins/cache-enabler/
123 stars 46 forks source link

Add check for existence of file before calling filesize() #134

Closed janvitos closed 4 years ago

janvitos commented 4 years ago

As per #133, Cache Enabler was throwing lots of warnings in the server error log every time the cache was being cleared.

This was nailed down to the filesize() function that was being called before checking if the file existed.

This code modification adds a check for the existence of the file before calling the filesize() function.