From 4761df7df7e771b06d417ce9c8dd0ebd81c0cfd8 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/tbl_replace_fields.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/tbl_replace_fields.inc.php b/libraries/tbl_replace_fields.inc.php index 356305419..60ef6ae97 100644 --- a/libraries/tbl_replace_fields.inc.php +++ b/libraries/tbl_replace_fields.inc.php @@ -116,7 +116,7 @@ if ($me_fields_upload != 'none') { } unset($tmp_subdir); } - } elseif (! empty($me_fields_uploadlocal)) { + } elseif (! empty($me_fields_uploadlocal) && !empty($GLOBALS['cfg']['UploadDir'])) { // ... or selected file from $cfg['UploadDir'] $file_to_insert = PMA_userDir($GLOBALS['cfg']['UploadDir']) . preg_replace('@\.\.*@', '.', $me_fields_uploadlocal);