@@ -966,8 +966,8 @@ function save_or_mail_results()
966
966
if ($ sum_results ['FAILED ' ]) {
967
967
foreach ($ PHP_FAILED_TESTS ['FAILED ' ] as $ test_info ) {
968
968
$ failed_tests_data .= $ sep . $ test_info ['name ' ] . $ test_info ['info ' ];
969
- $ failed_tests_data .= $ sep . file_get_contents (realpath ($ test_info ['output ' ]), FILE_BINARY );
970
- $ failed_tests_data .= $ sep . file_get_contents (realpath ($ test_info ['diff ' ]), FILE_BINARY );
969
+ $ failed_tests_data .= $ sep . file_get_contents (realpath ($ test_info ['output ' ]));
970
+ $ failed_tests_data .= $ sep . file_get_contents (realpath ($ test_info ['diff ' ]));
971
971
$ failed_tests_data .= $ sep . "\n\n" ;
972
972
}
973
973
$ status = "failed " ;
@@ -1163,12 +1163,12 @@ function save_text($filename, $text, $filename_copy = null)
1163
1163
global $ DETAILED ;
1164
1164
1165
1165
if ($ filename_copy && $ filename_copy != $ filename ) {
1166
- if (file_put_contents ($ filename_copy , $ text, FILE_BINARY ) === false ) {
1166
+ if (file_put_contents ($ filename_copy , $ text ) === false ) {
1167
1167
error ("Cannot open file ' " . $ filename_copy . "' (save_text) " );
1168
1168
}
1169
1169
}
1170
1170
1171
- if (file_put_contents ($ filename , $ text, FILE_BINARY ) === false ) {
1171
+ if (file_put_contents ($ filename , $ text ) === false ) {
1172
1172
error ("Cannot open file ' " . $ filename . "' (save_text) " );
1173
1173
}
1174
1174
@@ -1890,7 +1890,7 @@ function run_test($php, $file, $env)
1890
1890
$ section_text [$ key ] = dirname ($ file ) . '/ ' . trim (str_replace ('.. ' , '' , $ section_text [$ key ]));
1891
1891
1892
1892
if (file_exists ($ section_text [$ key ])) {
1893
- $ section_text [$ prefix ] = file_get_contents ($ section_text [$ key ], FILE_BINARY );
1893
+ $ section_text [$ prefix ] = file_get_contents ($ section_text [$ key ]);
1894
1894
unset($ section_text [$ key ]);
1895
1895
} else {
1896
1896
$ bork_info = "could not load -- " . $ key . "-- " . dirname ($ file ) . '/ ' . trim ($ section_text [$ key ]);
@@ -2724,12 +2724,12 @@ function run_test($php, $file, $env)
2724
2724
if (!$ passed ) {
2725
2725
2726
2726
// write .exp
2727
- if (strpos ($ log_format , 'E ' ) !== false && file_put_contents ($ exp_filename , $ wanted, FILE_BINARY ) === false ) {
2727
+ if (strpos ($ log_format , 'E ' ) !== false && file_put_contents ($ exp_filename , $ wanted ) === false ) {
2728
2728
error ("Cannot create expected test output - $ exp_filename " );
2729
2729
}
2730
2730
2731
2731
// write .out
2732
- if (strpos ($ log_format , 'O ' ) !== false && file_put_contents ($ output_filename , $ output, FILE_BINARY ) === false ) {
2732
+ if (strpos ($ log_format , 'O ' ) !== false && file_put_contents ($ output_filename , $ output ) === false ) {
2733
2733
error ("Cannot create test output - $ output_filename " );
2734
2734
}
2735
2735
@@ -2740,7 +2740,7 @@ function run_test($php, $file, $env)
2740
2740
$ diff = "# original source file: $ orig_shortname \n" . $ diff ;
2741
2741
}
2742
2742
show_file_block ('diff ' , $ diff );
2743
- if (strpos ($ log_format , 'D ' ) !== false && file_put_contents ($ diff_filename , $ diff, FILE_BINARY ) === false ) {
2743
+ if (strpos ($ log_format , 'D ' ) !== false && file_put_contents ($ diff_filename , $ diff ) === false ) {
2744
2744
error ("Cannot create test diff - $ diff_filename " );
2745
2745
}
2746
2746
@@ -2763,7 +2763,7 @@ function run_test($php, $file, $env)
2763
2763
;;
2764
2764
esac
2765
2765
SH ;
2766
- if (strpos ($ log_format , 'S ' ) !== false && file_put_contents ($ sh_filename , $ sh_script, FILE_BINARY ) === false ) {
2766
+ if (strpos ($ log_format , 'S ' ) !== false && file_put_contents ($ sh_filename , $ sh_script ) === false ) {
2767
2767
error ("Cannot create test shell script - $ sh_filename " );
2768
2768
}
2769
2769
chmod ($ sh_filename , 0755 );
@@ -2775,7 +2775,7 @@ function run_test($php, $file, $env)
2775
2775
---- ACTUAL OUTPUT
2776
2776
$ output
2777
2777
---- FAILED
2778
- ", FILE_BINARY ) === false ) {
2778
+ " ) === false ) {
2779
2779
error ("Cannot create test log - $ log_filename " );
2780
2780
error_report ($ file , $ log_filename , $ tested );
2781
2781
}
0 commit comments