Skip to content

Commit c46fd35

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-12838: [SOAP] Temporary WSDL cache files not being deleted
2 parents b7a468c + 4eee81b commit c46fd35

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ PHP NEWS
2727
. Fixed JIT bug (JIT emits "Attempt to assign property of non-object"
2828
warning at the same time as Error is being thrown). (Girgias)
2929

30+
- SOAP:
31+
. Fixed bug GH-12838 ([SOAP] Temporary WSDL cache files not being deleted).
32+
(nielsdos)
33+
3034
- Standard
3135
. Fixed GH-12745 (http_build_query() default null argument for $arg_separator
3236
is implicitly coerced to string). (Girgias)

ext/soap/php_sdl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2381,7 +2381,9 @@ static void add_sdl_to_cache(const char *fn, const char *uri, time_t t, sdlPtr s
23812381
/* Make sure that incomplete files (e.g. due to disk space issues, see bug #66150) are not utilised. */
23822382
if (valid_file) {
23832383
/* This is allowed to fail, this means that another process was raced to create the file. */
2384-
(void) VCWD_RENAME(ZSTR_VAL(temp_file_path), fn);
2384+
if (VCWD_RENAME(ZSTR_VAL(temp_file_path), fn) < 0) {
2385+
VCWD_UNLINK(ZSTR_VAL(temp_file_path));
2386+
}
23852387
}
23862388

23872389
smart_str_free(&buf);

0 commit comments

Comments
 (0)