From e53e7990c404e3ff2a1b7abad1e4c8ad4f89ee2a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 22 Nov 2011 01:48:08 +0100 Subject: [PATCH] improve get_temp_dir() implementation --- lib/base.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/base.php b/lib/base.php index 880645ff79..5b6ed9bcb1 100644 --- a/lib/base.php +++ b/lib/base.php @@ -271,6 +271,8 @@ if(!function_exists('get_temp_dir')) { unlink($temp); return dirname($temp); } + if( $temp=sys_get_temp_dir()) return $temp; + return null; } }