From 6015195223773cb568f481d4b1033ccb4d72f095 Mon Sep 17 00:00:00 2001 From: sharvey Date: Wed, 13 Jan 2010 00:30:44 +0000 Subject: [PATCH] BUGFIX #4791 Potential issue with creating files in SS installer on IIS - use the "b" mode when using fopen() to be more portable on platforms git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@96826 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- install.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install.php b/install.php index bc30019..dad45a2 100644 --- a/install.php +++ b/install.php @@ -924,12 +924,11 @@ PHP } } - 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");