Fix undefined temp file name.
authorJan Schneider <jan@horde.org>
Thu, 18 Mar 2010 16:19:09 +0000 (17:19 +0100)
committerJan Schneider <jan@horde.org>
Thu, 18 Mar 2010 16:19:09 +0000 (17:19 +0100)
framework/VFS/lib/VFS/ftp.php

index bfdca4b..4eee142 100644 (file)
@@ -226,7 +226,8 @@ class VFS_ftp extends VFS
     public function writeData($path, $name, $data, $autocreate = false)
     {
         $this->_checkQuotaWrite('string', $data);
-        file_put_contents(tempnam('null', 'vfs'), $data);
+        $tmpFile = tempnam(null, 'vfs');
+        file_put_contents($tmpFile, $data);
         try {
             $this->write($path, $name, $tmpFile, $autocreate);
             unlink($tmpFile);