Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: LoggerAppenderRollingFile.php
- ===================================================================
- --- LoggerAppenderRollingFile.php (revision 1374786)
- +++ LoggerAppenderRollingFile.php (working copy)
- @@ -79,6 +79,15 @@
- */
- protected $compress = false;
- + private $clearConditional = false;
- +
- + public function __construct($name = '') {
- + parent::__construct($name);
- + if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
- + $this->clearConditional = true;
- + }
- + }
- +
- /**
- * Get the maximum size that the output file is allowed to reach
- * before being rolled over to backup files.
- @@ -195,7 +204,11 @@
- }
- // Stats cache must be cleared, otherwise filesize() returns cached results
- - clearstatcache();
- + if ($this->clearConditional) {
- + clearstatcache(true, $this->file);
- + } else {
- + clearstatcache();
- + }
- // Rollover if needed
- if (filesize($this->file) > $this->maxFileSize) {
Advertisement
Add Comment
Please, Sign In to add comment