Commit 653a9275 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Remove warnings from logs

parent 75401e38
......@@ -210,7 +210,7 @@ function pieform_element_filebrowser_get_value(Pieform $form, $element) {
$value['action'] = 'createfolder';
$value['title'] = $_POST['createfolder_name'];
}
else if ($_POST['upload'] || ($_FILES['userfile'] && $_FILES['userfile']['name'])) {
else if (!empty($_POST['upload']) || ($_FILES['userfile'] && $_FILES['userfile']['name'])) {
$value['action'] = 'upload';
$value['userfile'] = $_FILES['userfile'];
$value['filename'] = isset($_FILES['userfile']['name']) ? $_FILES['userfile']['name'] : null;
......
......@@ -1455,7 +1455,7 @@ function files_submit(Pieform $form, $values) {
}
$result = pieform_element_filebrowser_submit($form->get_element('filebrowser'), $values['filebrowser']);
$result['action'] = $values['filebrowser']['action'];
if ($result['highlight']) {
if (!empty($result['highlight'])) {
$params['file'] = $result['highlight'];
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment