Development

Changeset 7830

You must first sign up to be able to contribute.

Changeset 7830

Show
Ignore:
Timestamp:
03/12/08 16:08:41 (1 year ago)
Author:
fabien
Message:

added a check to ensure that the config cache is valid

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/lib/config/sfConfigCache.class.php

    r7791 r7830  
    337337  { 
    338338    $fileCache = new sfFileCache(dirname($cache)); 
     339    $fileCache->setWriteControl(true); 
    339340    $fileCache->setSuffix(''); 
    340     $fileCache->set(basename($cache), '', $data); 
     341 
     342    if (!$fileCache->set(basename($cache), '', $data)) 
     343    { 
     344      $fileCache->remove(basename($cache), ''); 
     345 
     346      throw new sfConfigurationException(sprintf('Unable to write config cache for "%s".', $config)); 
     347    } 
    341348  } 
    342349} 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.