Skip to content
Snippets Groups Projects

Issue #2707689: NodeForm::actions() checks for delete access on new entities

1 file
+ 2
3
Compare changes
  • Side-by-side
  • Inline
  • f4d355a2
    Issue #3248809 by daffie, larowlan: [Symfony 6] The... · f4d355a2
    catch authored
    Issue #3248809 by daffie, larowlan: [Symfony 6] The Drupal\Tests\file\Kernel\FileItemValidationTest fails with Symfony 5
@@ -33,9 +33,8 @@ public function trans($id, array $parameters = [], $domain = NULL, $locale = NUL
// Symfony violation messages may separate singular and plural versions
// with "|".
$ids = explode('|', $id);
if (count($ids) > 1) {
$number = $parameters['%count%'] ?? 1;
return \Drupal::translation()->formatPlural($number, $ids[0], $ids[1], $this->processParameters($parameters), $this->getOptions($domain, $locale));
if ((count($ids) > 1) && isset($parameters['%count%'])) {
return \Drupal::translation()->formatPlural($parameters['%count%'], $ids[0], $ids[1], $this->processParameters($parameters), $this->getOptions($domain, $locale));
}
return new TranslatableMarkup($id, $this->processParameters($parameters), $this->getOptions($domain, $locale));
Loading