Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit f34bdada7b5cb37b655290fc8b1531f9b45b170c 1 parent 2978728
@chillu chillu authored
View
2  integration/XML.php
@@ -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
2  tests/ManifestBuilderTest.php
@@ -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);
}
View
4 tests/forms/TableListFieldTest.php
@@ -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,
Please sign in to comment.
Something went wrong with that request. Please try again.