some fix
This commit is contained in:
@ -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