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

index 232e0aabf9cd47786d3d3b23b6f2c32547191e47..f49c43e7c198d971a2035443d90f2e7a47a6a863 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) {