We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d742e11 commit 0b1a41aCopy full SHA for 0b1a41a
ext/openssl/openssl.c
@@ -7939,11 +7939,10 @@ PHP_OPENSSL_API zend_string* php_openssl_random_pseudo_bytes(zend_long buffer_le
7939
PHP_OPENSSL_CHECK_LONG_TO_INT_NULL_RETURN(buffer_length, length);
7940
PHP_OPENSSL_RAND_ADD_TIME();
7941
if (RAND_bytes((unsigned char*)ZSTR_VAL(buffer), (int)buffer_length) <= 0) {
7942
+ php_openssl_store_errors();
7943
zend_string_release_ex(buffer, 0);
7944
zend_throw_exception(zend_ce_exception, "Error reading from source device", 0);
7945
return NULL;
- } else {
7946
- php_openssl_store_errors();
7947
}
7948
7949
return buffer;
0 commit comments