Skip to content

Commit 064af6e

Browse files
committed
Some more tests fixes in standard
1 parent 27f6129 commit 064af6e

File tree

3 files changed

+5
-34
lines changed

3 files changed

+5
-34
lines changed

ext/standard/tests/file/file.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function fill_buffer(&$buffer, $fill_type, $fill_size) {
6868
return false;
6969
}
7070

71-
$tmp_buff = str_repeat($data, ($fill_size/$size_divider) + $add_value );
71+
$tmp_buff = str_repeat($data, (int)(($fill_size/$size_divider) + $add_value) );
7272

7373
if ( strlen($tmp_buff) > $fill_size ) {
7474
$buffer = substr($tmp_buff, 0, $fill_size);
@@ -128,15 +128,15 @@ function fill_file($file_handle, $fill_type, $file_size) {
128128
if ( $size <= $chunk_size ) {
129129
$chunk_size = $size;
130130
}
131-
$num_values = str_repeat($data, ($chunk_size/$size_divider) + $add_value );
131+
$num_values = str_repeat($data, (int) (($chunk_size/$size_divider) + $add_value) );
132132
$bytes_written = fwrite($file_handle, $num_values, $chunk_size);
133133
if ( $bytes_written != $chunk_size ) {
134134
return false;
135135
}
136136
$size -= $chunk_size;
137137
} while ( $size > 0 );
138138
} else {
139-
$num_values = str_repeat($data, ($chunk_size/$size_divider) + $add_value );
139+
$num_values = str_repeat($data, (int) (($chunk_size/$size_divider) + $add_value) );
140140
$bytes_written = fwrite($file_handle, $num_values, $file_size);
141141
if ( $bytes_written != $file_size ) {
142142
return false;

ext/standard/tests/file/flock_variation.phpt

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ $operations = array(
1818
LOCK_UN,
1919
1,
2020
2,
21-
2.234,
2221
TRUE
2322
);
2423

@@ -332,35 +331,5 @@ bool(true)
332331
bool(true)
333332
-- Inner iteration 13 in 8 --
334333
bool(true)
335-
--- Outer iteration 9 ---
336-
bool(true)
337-
-- Inner iteration 0 in 9 --
338-
bool(true)
339-
-- Inner iteration 1 in 9 --
340-
bool(true)
341-
-- Inner iteration 2 in 9 --
342-
bool(true)
343-
-- Inner iteration 3 in 9 --
344-
bool(true)
345-
-- Inner iteration 4 in 9 --
346-
bool(true)
347-
-- Inner iteration 5 in 9 --
348-
bool(true)
349-
-- Inner iteration 6 in 9 --
350-
bool(true)
351-
-- Inner iteration 7 in 9 --
352-
bool(true)
353-
-- Inner iteration 8 in 9 --
354-
bool(true)
355-
-- Inner iteration 9 in 9 --
356-
bool(true)
357-
-- Inner iteration 10 in 9 --
358-
bool(true)
359-
-- Inner iteration 11 in 9 --
360-
bool(true)
361-
-- Inner iteration 12 in 9 --
362-
bool(true)
363-
-- Inner iteration 13 in 9 --
364-
bool(true)
365334

366335
*** Done ***

ext/standard/tests/strings/bug47842.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,7 @@ sscanf 32-bit unsign int '4294967295' (2^32)-1 = 4294967295
3030
sscanf 64-bit signed int '9223372036854775807' (2^63)-1 = 9223372036854775807
3131
sscanf 64-bit unsign int '18446744073709551615' (2^64)-1 = 18446744073709551615
3232
printf 64-bit signed int '9223372036854775807' (2^63)-1 = 9223372036854775807
33+
34+
Deprecated: Implicit conversion to int from non-compatible float in %s on line %d
3335
printf 64-bit signed int '18446744073709551615' (2^64)-1 = 0
3436
Done

0 commit comments

Comments
 (0)