Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Fix GH-12838: [SOAP] Temporary WSDL cache files not being deleted
This commit is contained in:
Niels Dossche 2023-12-01 17:11:43 +01:00
commit c46fd35f7b
2 changed files with 7 additions and 1 deletions

4
NEWS
View file

@ -27,6 +27,10 @@ PHP NEWS
. Fixed JIT bug (JIT emits "Attempt to assign property of non-object"
warning at the same time as Error is being thrown). (Girgias)
- SOAP:
. Fixed bug GH-12838 ([SOAP] Temporary WSDL cache files not being deleted).
(nielsdos)
- Standard
. Fixed GH-12745 (http_build_query() default null argument for $arg_separator
is implicitly coerced to string). (Girgias)

View file

@ -2381,7 +2381,9 @@ static void add_sdl_to_cache(const char *fn, const char *uri, time_t t, sdlPtr s
/* Make sure that incomplete files (e.g. due to disk space issues, see bug #66150) are not utilised. */
if (valid_file) {
/* This is allowed to fail, this means that another process was raced to create the file. */
(void) VCWD_RENAME(ZSTR_VAL(temp_file_path), fn);
if (VCWD_RENAME(ZSTR_VAL(temp_file_path), fn) < 0) {
VCWD_UNLINK(ZSTR_VAL(temp_file_path));
}
}
smart_str_free(&buf);