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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102641 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-13 03:19:41 +00:00
parent 2978728265
commit f34bdada7b
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,