Permalink
Browse files

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
  • Loading branch information...
1 parent 2978728 commit f34bdada7b5cb37b655290fc8b1531f9b45b170c @chillu chillu committed Apr 13, 2010
Showing with 4 additions and 4 deletions.
  1. +1 −1 integration/XML.php
  2. +1 −1 tests/ManifestBuilderTest.php
  3. +2 −2 tests/forms/TableListFieldTest.php
View
@@ -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);
@@ -107,7 +107,7 @@ function setUp() {
} else {
touch($baseFolder . $item);
if($itemContent) {
- $fh = fopen($baseFolder . $item, 'w');
+ $fh = fopen($baseFolder . $item, 'wb');
fwrite($fh, $itemContent);
fclose($fh);
}
@@ -162,11 +162,11 @@ function testCsvExport() {
// 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,

0 comments on commit f34bdad

Please sign in to comment.