Skip to content

Commit

Permalink
Avoid error on empty value
Browse files Browse the repository at this point in the history
  • Loading branch information
pabgaran committed Dec 17, 2013
1 parent 921de0f commit 8f95db6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Command/ImportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ protected function importBundle($bundle)
$loader->loadMessages(dirname($translationFilePath), $catalogue);

foreach ($catalogue->all($propertyList['name']) as $alias => $value) {
// Avoid error on empty value
if($value === null) {
$this->output->writeln("\n <error>Warning: Empty value on ".$alias."</error>" );
continue;
}
// Get or create entry
$entryListFiltered = array_filter(
$entryList,
Expand Down

0 comments on commit 8f95db6

Please sign in to comment.