MINOR Use 'b' mode for fopen() where possible for better portability

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98321 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2010-02-07 02:14:54 +00:00 committed by Sam Minnee
parent 7de75919ac
commit a93d12cf31
3 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ class XML extends Object {
function tidyXHTML($content) {
$cleanFile = TEMP_FOLDER . "/cleaner.tmp";
$fh = fopen($cleanFile,"w");
$fh = fopen($cleanFile,"wb");
fwrite($fh, $content);
fclose($fh);

View File

@ -107,7 +107,7 @@ class ManifestBuilderTest extends SapphireTest {
} else {
touch($baseFolder . $item);
if($itemContent) {
$fh = fopen($baseFolder . $item, 'w');
$fh = fopen($baseFolder . $item, 'wb');
fwrite($fh, $itemContent);
fclose($fh);
}

View File

@ -162,11 +162,11 @@ class TableListFieldTest extends SapphireTest {
// Create a temporary file and write the CSV to it.
$csvFileName = tempnam(TEMP_FOLDER, 'csv-export');
$csvFile = fopen($csvFileName, 'w');
$csvFile = fopen($csvFileName, 'wb');
fwrite($csvFile, $csvOutput);
fclose($csvFile);
$csvFile = fopen($csvFileName, 'r');
$csvFile = fopen($csvFileName, 'rb');
$csvRow = fgetcsv($csvFile);
$this->assertEquals(
$csvRow,