From 068eac20efcd1b87700fcce6d2d1b82294ea01a4 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 25 Jun 2009 01:35:15 +0000 Subject: [PATCH] MFB: Handle instances where TMPDIR = "" --- main/php_open_temporary_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.40.0