BUGFIX Use "wb" argument in ManifestBuilder fopen() calls for better cross-platform compatibility (from r100862)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@108830 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andreas Piening 2010-08-03 03:50:43 +00:00
parent ccda3bbc20
commit 4ea1e6e3c1

View File

@ -83,7 +83,7 @@ class ManifestBuilder {
// Build the manifest, including the tests/ folders
$manifestInfo = self::get_manifest_info(BASE_PATH);
$manifest = self::generate_php_file($manifestInfo);
if($fh = fopen($testManifestFile, "w")) {
if($fh = fopen($testManifestFile, 'wb')) {
fwrite($fh, $manifest);
fclose($fh);
} else {
@ -110,7 +110,7 @@ class ManifestBuilder {
$manifestInfo = self::get_manifest_info(BASE_PATH, array("tests"));
$manifest = self::generate_php_file($manifestInfo);
if($fh = fopen(MANIFEST_FILE, "w")) {
if($fh = fopen(MANIFEST_FILE, 'wb')) {
fwrite($fh, $manifest);
fclose($fh);
} else {
@ -427,8 +427,8 @@ class ManifestBuilder {
$cacheContent = '<?php
$classes = ' . var_export($classes,true) . ';
$interfaces = ' . var_export($interfaces,true) . ';';
if($fh = fopen($parseCacheFile,'wb')) {
if($fh = fopen($parseCacheFile, 'wb')) {
fwrite($fh, $cacheContent);
fclose($fh);
}