Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f02b687

Browse files
committed
[FrameworkBundle] Convert null prefix to an empty string in translation:update command
1 parent b28cd81 commit f02b687

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
118118
// load any messages from templates
119119
$extractedCatalogue = new MessageCatalogue($input->getArgument('locale'));
120120
$output->text('Parsing templates');
121+
$prefix = $input->getOption('prefix');
121122
$extractor = $this->getContainer()->get('translation.extractor');
122-
$extractor->setPrefix($input->getOption('prefix'));
123+
$extractor->setPrefix(null === $prefix ? '' : $prefix);
123124
foreach ($transPaths as $path) {
124125
$path .= 'views';
125126
if (is_dir($path)) {

0 commit comments

Comments
 (0)