From: Ilia Alshanetsky Date: Thu, 25 Jun 2009 01:35:05 +0000 (+0000) Subject: Handle instances where TMPDIR = "" X-Git-Tag: php-5.2.11RC1~235 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f01baf3965045467bdf42297685c111e0dceb2e4;p=php Handle instances where TMPDIR = "" --- diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index af86a0b690..7c90f1f39b 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -199,7 +199,7 @@ PHPAPI const char* php_get_temporary_directory(void) /* On Unix use the (usual) TMPDIR environment variable. */ { char* s = getenv("TMPDIR"); - if (s) { + if (s && *s) { int len = strlen(s); if (s[len - 1] == DEFAULT_SLASH) {