Skip to content

Commit 1d661f8

Browse files
committed
Remove exception in Randomizer::shuffleArray()
Same reasoning as in the previous commit applies.
1 parent 6903a2a commit 1d661f8

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

ext/random/randomizer.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ PHP_METHOD(Random_Randomizer, shuffleArray)
193193

194194
ZVAL_DUP(return_value, array);
195195
if (!php_array_data_shuffle(randomizer->algo, randomizer->status, return_value)) {
196-
zend_throw_exception(spl_ce_RuntimeException, "Random number generation failed", 0);
197196
RETURN_THROWS();
198197
}
199198
}

ext/random/tests/03_randomizer/user_unsafe.phpt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,6 @@ Stack trace:
9595
#0 %s(%d): Random\Randomizer->shuffleArray(Array)
9696
#1 {main}
9797

98-
Next RuntimeException: Random number generation failed in %s:%d
99-
Stack trace:
100-
#0 %s(%d): Random\Randomizer->shuffleArray(Array)
101-
#1 {main}
102-
10398
-------
10499

105100
Error: A random engine must return a non-empty string in %s:%d
@@ -132,11 +127,6 @@ Stack trace:
132127
#0 %s(%d): Random\Randomizer->shuffleArray(Array)
133128
#1 {main}
134129

135-
Next RuntimeException: Random number generation failed in %s:%d
136-
Stack trace:
137-
#0 %s(%d): Random\Randomizer->shuffleArray(Array)
138-
#1 {main}
139-
140130
-------
141131

142132
Error: Failed to generate an acceptable random number in 50 attempts in %s:%d

0 commit comments

Comments
 (0)