Check whether UploadDir is defined before using it.

This commit is contained in:
Michal Čihař
2008-04-22 11:26:24 +00:00
parent 62ea44475d
commit cda28f8cdc

View File

@@ -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'];