mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2025-06-25 04:22:35 +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:
@ -1162,7 +1162,7 @@ if (isset($_GET['upload']) && !FM_READONLY) {
|
|||||||
|
|
||||||
// copy form POST
|
// copy form POST
|
||||||
if (isset($_POST['copy']) && !FM_READONLY) {
|
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)) {
|
if (!is_array($copy_files) || empty($copy_files)) {
|
||||||
fm_set_msg('Nothing selected', 'alert');
|
fm_set_msg('Nothing selected', 'alert');
|
||||||
fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH));
|
fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH));
|
||||||
|
Reference in New Issue
Block a user