Skip to content

Commit 3082610

Browse files
committed
fixup! move env variable extract to get_env_location
1 parent f4ecfac commit 3082610

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main/php_ini.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ static char* get_env_location(const char *envname)
416416
{
417417
char *env_location = getenv(envname);
418418
#ifdef PHP_WIN32
419-
char *reg_location;
420419
char phprc_path[MAXPATHLEN];
421420
#endif
422421

@@ -503,11 +502,13 @@ int php_init_config(void)
503502
int search_path_size;
504503
char *default_location;
505504
char *env_location = get_env_location("PHPRC");
505+
#ifdef PHP_WIN32
506+
char *reg_location;
507+
#endif
506508

507509
/*
508510
* Prepare search path
509511
*/
510-
511512
search_path_size = MAXPATHLEN * 4 + (int)strlen(env_location) + 3 + 1;
512513
php_ini_search_path = (char *) emalloc(search_path_size);
513514
free_ini_search_path = 1;

0 commit comments

Comments
 (0)