Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  random: Fix unknown `mt_srand()` compatibility for unknown modes (#13544)
  Removed `REPORT_EXIT_STATUS=no` in libmysql tests
  Revert "Fix GH-13519: PGSQL_CONNECT_FORCE_RENEW with persistent connections." (#13546)
This commit is contained in:
Tim Düsterhus 2024-02-29 18:07:00 +01:00
commit e6c0b09e88
No known key found for this signature in database
GPG key ID: 8FF75566094168AF
3 changed files with 33 additions and 4 deletions

View file

@ -486,11 +486,13 @@ PHP_FUNCTION(mt_srand)
Z_PARAM_LONG(mode)
ZEND_PARSE_PARAMETERS_END();
state->mode = mode;
/* Anything that is not MT_RAND_MT19937 was interpreted as MT_RAND_PHP. */
if (state->mode != MT_RAND_MT19937) {
switch (mode) {
case MT_RAND_PHP:
state->mode = MT_RAND_PHP;
zend_error(E_DEPRECATED, "The MT_RAND_PHP variant of Mt19937 is deprecated");
break;
default:
state->mode = MT_RAND_MT19937;
}
if (seed_is_null) {