cvs: php4 /main php_ini.c

From: Date: Tue, 06 Mar 2001 11:38:56 +0000
Subject: cvs: php4 /main php_ini.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4406@lists.php.net to get a copy of this message
stas Tue Mar 6 03:38:56 2001 EDT Modified files: /php4/main php_ini.c Log: Don't insert empty path if PHPRC is empty Index: php4/main/php_ini.c diff -u php4/main/php_ini.c:1.53 php4/main/php_ini.c:1.54 --- php4/main/php_ini.c:1.53 Sun Feb 25 22:07:31 2001 +++ php4/main/php_ini.c Tue Mar 6 03:38:55 2001 @@ -241,7 +241,11 @@ #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); }

« previous php.cvs (#4406) next »