]> granicus.if.org Git - php/commitdiff
Handle instances where TMPDIR = ""
authorIlia Alshanetsky <iliaa@php.net>
Thu, 25 Jun 2009 01:35:05 +0000 (01:35 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 25 Jun 2009 01:35:05 +0000 (01:35 +0000)
main/php_open_temporary_file.c

index af86a0b6909e8f9745bce9cc9b4b62ba3b4e6b45..7c90f1f39b71c27b506322c61d210b5e5fe2b32f 100644 (file)
@@ -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) {