Permalink
Browse files

BUGFIX #4791 Potential issue with creating files in SS installer on I…

…IS - use the "b" mode when using fopen() to be more portable on platforms (from r96826)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@112088 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
sminnee
sminnee committed Oct 13, 2010
1 parent e013e75 commit e8bb141aaa5d5ee5bc130a3f2103a77892fd87c7
Showing with 1 addition and 2 deletions.
  1. +1 −2 install.php
View
@@ -924,12 +924,11 @@ function copyFolder($oldName, $newName) {
}
}
-
function createFile($filename, $content) {
$base = $this->getBaseDir();
$this->statusMessage("Creating $base$filename");
- if((@$fh = fopen($base . $filename, 'w')) && fwrite($fh, $content) && fclose($fh)) {
+ if((@$fh = fopen($base . $filename, 'wb')) && fwrite($fh, $content) && fclose($fh)) {
return true;
} else {
$this->error("Couldn't write to file $base$filename");

0 comments on commit e8bb141

Please sign in to comment.