From c991555de5cc1698575c35eefd256ba24559642c Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Tue, 18 Feb 2020 18:16:21 +0100 Subject: [PATCH] Avoid accessing undefined $_POST['file'] index (#308) I don't know when this occurs, but I have this entry in my web server log: PHP Notice: Undefined index: file in tinyfilemanager.php on line 1165 --- tinyfilemanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 3d27425..61849a7 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -1162,7 +1162,7 @@ if (isset($_GET['upload']) && !FM_READONLY) { // copy form POST if (isset($_POST['copy']) && !FM_READONLY) { - $copy_files = $_POST['file']; + $copy_files = isset($_POST['file']) ? $_POST['file'] : null; if (!is_array($copy_files) || empty($copy_files)) { fm_set_msg('Nothing selected', 'alert'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH));