mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-05-04 06:43:18 +02:00
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
This commit is contained in:
parent
9e3877270b
commit
c991555de5
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue