diff options
| author | Stanislav Malyshev <stas@php.net> | 2001-03-06 11:38:55 +0000 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2001-03-06 11:38:55 +0000 |
| commit | 7c2ea02288b0c5b607c85e21b4f51c8082d61255 (patch) | |
| tree | f83a0028c0445cfb1f9250152c3520a56b9bc7f7 /main/php_ini.c | |
| parent | 5d3939ac39eaaeb4c7e8faaaba3ce942fc013b2f (diff) | |
| download | php-git-7c2ea02288b0c5b607c85e21b4f51c8082d61255.tar.gz | |
Don't insert empty path if PHPRC is empty
Diffstat (limited to 'main/php_ini.c')
| -rw-r--r-- | main/php_ini.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/php_ini.c b/main/php_ini.c index 6f03ebe35d..fbc29bba4b 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -241,7 +241,11 @@ int php_init_config(char *php_ini_path_override) #endif php_ini_search_path = (char *) emalloc(sizeof(".")+strlen(env_location)+strlen(default_location)+2+1); free_ini_search_path = 1; - sprintf(php_ini_search_path, ".%c%s%c%s", ZEND_PATHS_SEPARATOR, env_location, ZEND_PATHS_SEPARATOR, default_location); + if(env_location && env_location[0]) { + sprintf(php_ini_search_path, ".%c%s%c%s", ZEND_PATHS_SEPARATOR, env_location, ZEND_PATHS_SEPARATOR, default_location); + } else { + sprintf(php_ini_search_path, ".%c%s", ZEND_PATHS_SEPARATOR, default_location); + } if (free_default_location) { efree(default_location); } |
