Forums / Bug Reports / [Done v1.5.0] Debug log generated when SQL_CACHE_METHOD == 'file'

[Done v1.5.0] Debug log generated when SQL_CACHE_METHOD == 'file'

Locked

Started by lat9 on 14 Feb 2011, 3:47 PM · Views: 893

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
14 Feb 2011, 3:47 PM
#1
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,127
Plugin Contributions:
56

[Done v1.5.0] Debug log generated when SQL_CACHE_METHOD == 'file'

Running 1.3.9f.

I noticed that I've got a couple of debug log files that contain:

[20-Jan-2011 23:16:36] PHP Warning:  filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for /cache/zc_cc21d2f64edffccfe06d12dd3327bf64.sql in /includes/classes/cache.php on line 59

The warning can be overridden by making the following modification to /includes/classes/cache.php:

    switch (SQL_CACHE_METHOD) {
      case 'file':
      if (@filemtime(DIR_FS_SQL_CACHE . '/' . $zp_cache_name . '.sql') > (time() - $zf_cachetime)) {
        return false;
      } else {
        return true;
      }
      break;