Skip to content

Commit

Permalink
Fix intermittent failure of bug_68819_002.phpt
Browse files Browse the repository at this point in the history
The test used rand(32, 127) to select the character, however
chr(127) results in "data" instead of the expected result, so this
test would fail in something like 1% of the runs.

Replace rand() with fixed character "a".
  • Loading branch information
nikic committed Mar 1, 2016
1 parent 0bbea60 commit 471540d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/fileinfo/tests/bug68819_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $string .= "\r\n";
$string .= "''''";

// Total string length > 8192
$string .= str_repeat(chr(rand(32, 127)), 8184);
$string .= str_repeat("a", 8184);

// Ending in this string
$string .= "say";
Expand Down

0 comments on commit 471540d

Please sign in to comment.