Skip to content

Commit 01767b3

Browse files
Merge branch '2.7' into 2.8
* 2.7: [travis] Test on PHP 7.1 [FrameworkBundle] Convert null prefix to an empty string in translation:update command
2 parents 6ccef19 + 0430e78 commit 01767b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Command/TranslationUpdateCommand.php

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

0 commit comments

Comments
 (0)