Skip to content

Commit 9995514

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
2 parents 054d83b + da3ce60 commit 9995514

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ PHP NEWS
6464
. Fixed bug GH-10623 (Reflection::getClosureUsedVariables opcode fix with
6565
variadic arguments). (nielsdos)
6666

67+
- Session:
68+
. Fixed ps_files_cleanup_dir() on failure code paths with -1 instead of 0 as
69+
the latter was considered success by callers. (nielsdos).
70+
6771
- Standard:
6872
. Fixed bug GH-8086 (Introduce mail.mixed_lf_and_crlf INI). (Jakub Zelenka)
6973
. Fixed bug GH-10292 (Made the default value of the first param of srand() and

ext/session/mod_files.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,15 @@ static int ps_files_cleanup_dir(const zend_string *dirname, zend_long maxlifetim
288288
dir = opendir(ZSTR_VAL(dirname));
289289
if (!dir) {
290290
php_error_docref(NULL, E_NOTICE, "ps_files_cleanup_dir: opendir(%s) failed: %s (%d)", ZSTR_VAL(dirname), strerror(errno), errno);
291-
return (0);
291+
return -1;
292292
}
293293

294294
time(&now);
295295

296296
if (ZSTR_LEN(dirname) >= MAXPATHLEN) {
297297
php_error_docref(NULL, E_NOTICE, "ps_files_cleanup_dir: dirname(%s) is too long", ZSTR_VAL(dirname));
298298
closedir(dir);
299-
return (0);
299+
return -1;
300300
}
301301

302302
/* Prepare buffer (dirname never changes) */

0 commit comments

Comments
 (0)