summaryrefslogtreecommitdiff
path: root/ext/gmp/gmp.c
diff options
context:
space:
mode:
authorLeigh <leight@gmail.com>2014-09-23 22:54:40 +0100
committerLeigh <leight@gmail.com>2014-09-23 22:54:40 +0100
commit31e27fc89ac0403aeac5ad02f09a308e830f1f05 (patch)
treed8b548aac89b425c706b76410e2b357c8fc132aa /ext/gmp/gmp.c
parent831bb9260c314290a34635d7a907673f8e9d9063 (diff)
downloadphp-git-31e27fc89ac0403aeac5ad02f09a308e830f1f05.tar.gz
Add test files
Diffstat (limited to 'ext/gmp/gmp.c')
-rw-r--r--ext/gmp/gmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index 36c8260f5b..d38311a5be 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -1841,9 +1841,9 @@ ZEND_FUNCTION(gmp_random_bits)
return;
}
- if (bits < 0) {
+ if (bits <= 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The number of bits must be positive");
- RETURN_FALSE;
+ return;
}
INIT_GMP_RETVAL(gmpnum_result);