Changeset 6398
- Timestamp:
- 12/09/07 19:45:54 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/lib/log/sfLogger/sfFileLogger.class.php
r3329 r6398 40 40 } 41 41 42 if (!is_writable($dir) || ( file_exists($options['file']) && !is_writable($options['file'])))42 if (!is_writable($dir) || ($fileExists = file_exists($options['file']) && !is_writable($options['file']))) 43 43 { 44 44 throw new sfFileException(sprintf('Unable to open the log file "%s" for writing', $options['file'])); … … 46 46 47 47 $this->fp = fopen($options['file'], 'a'); 48 if (!$fileExists) 49 { 50 chmod($options['file'], 0666); 51 } 48 52 } 49 53