Skip to content

Commit 9dcf494

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #79489: .user.ini does not inherit
2 parents cdd0a90 + 4b0d5e0 commit 9dcf494

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sapi/cgi/cgi_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,11 @@ static void php_cgi_ini_activate_user_config(char *path, size_t path_len, const
829829
if (strncmp(s1, s2, s_len) == 0) {
830830
#endif
831831
char *ptr = s2 + doc_root_len;
832+
#ifdef PHP_WIN32
833+
while ((ptr = strpbrk(ptr, "\\/")) != NULL) {
834+
#else
832835
while ((ptr = strchr(ptr, DEFAULT_SLASH)) != NULL) {
836+
#endif
833837
*ptr = 0;
834838
php_parse_user_ini_file(path, PG(user_ini_filename), entry->user_config);
835839
*ptr = '/';

0 commit comments

Comments
 (0)