com php-src: Allow min > max for mt_rand(). Bug # 72784: ext/standard/mt_rand.c

From: Date: Mon, 08 Aug 2016 21:16:27 +0000
Subject: com php-src: Allow min > max for mt_rand(). Bug # 72784: ext/standard/mt_rand.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93677@lists.php.net to get a copy of this message
Commit: 99e3bb14307a6fb0bf777f68408ab07351c0d6ed Author: Leigh <leigh@php.net> Mon, 8 Aug 2016 22:16:27 +0100 Parents: ab45f13a0b9bebfbc6bfeb7aa9303cd8c62cda69 Branches: PHP-7.1 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=99e3bb14307a6fb0bf777f68408ab07351c0d6ed Log: Allow min > max for mt_rand(). Bug #72784 Bugs: https://bugs.php.net/72784 Changed paths: M ext/standard/mt_rand.c Diff: diff --git a/ext/standard/mt_rand.c b/ext/standard/mt_rand.c index 39b4200..c0b1d0a 100644 --- a/ext/standard/mt_rand.c +++ b/ext/standard/mt_rand.c @@ -276,7 +276,6 @@ PHP_FUNCTION(mt_rand) if (UNEXPECTED(max < min)) { php_error_docref(NULL, E_WARNING, "max(" ZEND_LONG_FMT ") is smaller than min(" ZEND_LONG_FMT ")", max, min); - RETURN_FALSE; } if (BG(mt_rand_mode) == MT_RAND_MT19937) {

« previous php.cvs (#93677) next »