mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Fixed static analysis issues
This commit is contained in:
parent
5745fc1046
commit
2c799d894b
2 changed files with 2 additions and 2 deletions
|
@ -362,8 +362,8 @@ abstract class BaseAdminController extends AbstractController
|
|||
try {
|
||||
$errors = $importer->importFileAndPersistToDB($file, $options);
|
||||
|
||||
foreach ($errors as $name => $error) {
|
||||
/** @var ConstraintViolationList $error */
|
||||
foreach ($errors as $name => $error) {
|
||||
foreach ($error['violations'] as $violation) {
|
||||
$this->addFlash('error', $name.': '.$violation->getMessage());
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ class PartImportExportController extends AbstractController
|
|||
goto ret;
|
||||
}
|
||||
|
||||
if ($errors) {
|
||||
if (!isset($errors) || $errors) {
|
||||
$this->addFlash('error', 'parts.import.flash.error');
|
||||
} else {
|
||||
$this->addFlash('success', 'parts.import.flash.success');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue