Skip to content

Commit

Permalink
[#4577] Remove calls to xPDO->log() in xPDOCacheManager->writeFile()
Browse files Browse the repository at this point in the history
Since the log() method calls the writeFile() method, if the file could not be written to for some reason, an infinite loop was being created by the log() attempts.
  • Loading branch information
opengeek committed May 3, 2011
1 parent b228da5 commit 38bb1fb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions xpdo/cache/xpdocachemanager.class.php
Expand Up @@ -244,11 +244,6 @@ public function writeFile($filename, $content, $mode= 'wb', $options= array()) {
}
}
@fclose($file);
if ($written === false) {
$this->xpdo->log(xPDO::LOG_LEVEL_ERROR, "Error writing file: {$filename}");
}
} else {
$this->xpdo->log(xPDO::LOG_LEVEL_ERROR, "Could not open file for writing: {$filename}");
}
return ($written !== false);
}
Expand Down
1 change: 1 addition & 0 deletions xpdo/changelog.txt
@@ -1,5 +1,6 @@
This file shows the changes in this release of xPDO.

- [#4577] Remove calls to xPDO->log() in xPDOCacheManager->writeFile()
- Add options to xPDOCacheManager::writeFile() to allow multiple attempts when exclusive locks fail

xPDO 2.1.2-pl (March 25, 2011)
Expand Down

0 comments on commit 38bb1fb

Please sign in to comment.