Changeset 1531

Show
Ignore:
Timestamp:
12/14/07 10:33:45 (9 months ago)
Author:
Shadowhand
Message:

Fixing a bug in Cache_Sqlite that could cause PHP to shutdown unexpectedly (attempting to open a sqlite database that is not readable).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/drivers/Cache_Sqlite.php

    r1522 r1531  
    3939        if ( ! is_dir($directory) OR ! is_writable($directory)) 
    4040            throw new Kohana_Exception('cache.unwritable', $directory); 
     41 
     42        // Make sure the cache database is writable 
     43        if (file_exists($filename) AND ! is_writable($filename)) 
     44            throw new Kohana_Exception('cache.unwritable', $filename); 
    4145 
    4246        // Open up an instance of the database