diff --git a/NEWS b/NEWS index 01bcee1ebb3..fb1fa2b793f 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,10 @@ PHP NEWS . pg_convert/pg_insert/pg_update/pg_delete ; regexes are now cached. (David Carlier) +- Random: + . Fixed bug GH-15094 (php_random_default_engine() is not C++ conforming). + (cmb) + - Standard: . Fix references in request_parse_body() options array. (nielsdos) . Add RoundingMode enum. (timwolla, saki) diff --git a/ext/random/php_random.h b/ext/random/php_random.h index e4aa3212667..4c6ce344f6e 100644 --- a/ext/random/php_random.h +++ b/ext/random/php_random.h @@ -167,10 +167,10 @@ PHPAPI void *php_random_default_status(void); static inline php_random_algo_with_state php_random_default_engine(void) { - return (php_random_algo_with_state){ - .algo = php_random_default_algo(), - .state = php_random_default_status(), - }; + php_random_algo_with_state raws; + raws.algo = php_random_default_algo(); + raws.state = php_random_default_status(); + return raws; } PHPAPI zend_string *php_random_bin2hex_le(const void *ptr, const size_t len);