From: Ilia Alshanetsky Date: Thu, 25 Jun 2009 01:35:15 +0000 (+0000) Subject: MFB: Handle instances where TMPDIR = "" X-Git-Tag: php-5.4.0alpha1~191^2~3241 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=068eac20efcd1b87700fcce6d2d1b82294ea01a4;p=php MFB: Handle instances where TMPDIR = "" --- diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index 232e0aabf9..f49c43e7c1 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) {