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 {
|
try {
|
||||||
$errors = $importer->importFileAndPersistToDB($file, $options);
|
$errors = $importer->importFileAndPersistToDB($file, $options);
|
||||||
|
|
||||||
|
/** @var ConstraintViolationList $error */
|
||||||
foreach ($errors as $name => $error) {
|
foreach ($errors as $name => $error) {
|
||||||
/** @var ConstraintViolationList $error */
|
|
||||||
foreach ($error['violations'] as $violation) {
|
foreach ($error['violations'] as $violation) {
|
||||||
$this->addFlash('error', $name.': '.$violation->getMessage());
|
$this->addFlash('error', $name.': '.$violation->getMessage());
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,7 @@ class PartImportExportController extends AbstractController
|
||||||
goto ret;
|
goto ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($errors) {
|
if (!isset($errors) || $errors) {
|
||||||
$this->addFlash('error', 'parts.import.flash.error');
|
$this->addFlash('error', 'parts.import.flash.error');
|
||||||
} else {
|
} else {
|
||||||
$this->addFlash('success', 'parts.import.flash.success');
|
$this->addFlash('success', 'parts.import.flash.success');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue