From 02491a4f85b1d1581ce1fe70527bb064ca14f268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 22 Apr 2008 11:26:24 +0000 Subject: [PATCH] Check whether UploadDir is defined before using it. --- libraries/File.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/File.class.php b/libraries/File.class.php index a1dbd3fe2..9417d491d 100644 --- a/libraries/File.class.php +++ b/libraries/File.class.php @@ -466,6 +466,8 @@ class PMA_File */ function setLocalSelectedFile($name) { + if (empty($GLOBALS['cfg']['UploadDir'])) return false; + $this->setName(PMA_userDir($GLOBALS['cfg']['UploadDir']) . PMA_securePath($name)); if (! $this->isReadable()) { $this->_error_message = $GLOBALS['strFileCouldNotBeRead']; @@ -875,4 +877,4 @@ class PMA_File } } -?> \ No newline at end of file +?>