Skip to content

Commit 1c9b3c6

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

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
@@ -132,7 +132,6 @@ PHP_METHOD(Random_Randomizer, getInt)
132132

133133
result = randomizer->algo->range(randomizer->status, min, max);
134134
if (EG(exception)) {
135-
zend_throw_exception(spl_ce_RuntimeException, "Random number generation failed", 0);
136135
RETURN_THROWS();
137136
}
138137

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ Stack trace:
7171
#0 %s(%d): Random\Randomizer->getInt(0, 123)
7272
#1 {main}
7373

74-
Next RuntimeException: Random number generation failed in %s:%d
75-
Stack trace:
76-
#0 %s(%d): Random\Randomizer->getInt(0, 123)
77-
#1 {main}
78-
7974
-------
8075

8176
Error: A random engine must return a non-empty string in %s:%d
@@ -111,11 +106,6 @@ Stack trace:
111106
#0 %s(%d): Random\Randomizer->getInt(0, 123)
112107
#1 {main}
113108

114-
Next RuntimeException: Random number generation failed in %s:%d
115-
Stack trace:
116-
#0 %s(%d): Random\Randomizer->getInt(0, 123)
117-
#1 {main}
118-
119109
-------
120110

121111
string(2) "ff"

0 commit comments

Comments
 (0)