some fix
This commit is contained in:
1 parent
da77807b81
commit
fc2e969d77
5 files changed
+24
-20
No files matched your search
@@ -34,7 +34,7 @@ class MenuController extends AdminController
|
||||
#[NoReturn] public function actionAdd(): void
|
||||
{
|
||||
if (isset($_FILES['icon_file']) && $_FILES['icon_file']['error'] === UPLOAD_ERR_OK) {
|
||||
$file = new FileUpload($_FILES['icon_file']);
|
||||
$file = new FileUpload($_FILES['icon_file'], ['jpg', 'jpeg', 'png']);
|
||||
$file->upload();
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ class MenuController extends AdminController
|
||||
throw new Exception(message: "The menu item not found");
|
||||
}
|
||||
if (isset($_FILES['icon_file']) && $_FILES['icon_file']['error'] === UPLOAD_ERR_OK) {
|
||||
$file = new FileUpload($_FILES['icon_file']);
|
||||
$file = new FileUpload($_FILES['icon_file'], ['jpg', 'jpeg', 'png']);
|
||||
$file->upload();
|
||||
}
|
||||
$menuForm = new CreateMenuForm();
|
||||
|
||||
Reference in new issue
Block a user