Browse Source

fix implode ordre of parameters

d9_islandora
ezoller 4 years ago
parent
commit
7a5bcfadb7
  1. 6
      src/Form/IslandoraSettingsForm.php

6
src/Form/IslandoraSettingsForm.php

@ -144,7 +144,7 @@ class IslandoraSettingsForm extends ConfigFormBase {
'#title' => $this->t('JWT Expiry'), '#title' => $this->t('JWT Expiry'),
'#default_value' => $config->get(self::JWT_EXPIRY), '#default_value' => $config->get(self::JWT_EXPIRY),
'#description' => $this->t('A positive time interval expression. Eg: "60 secs", "2 days", "10 hours", "7 weeks". Be sure you provide the time units (@unit), plurals are accepted.', '#description' => $this->t('A positive time interval expression. Eg: "60 secs", "2 days", "10 hours", "7 weeks". Be sure you provide the time units (@unit), plurals are accepted.',
['@unit' => implode(self::TIME_INTERVALS, ", ")] ['@unit' => implode(", ", self::TIME_INTERVALS)]
), ),
]; ];
@ -255,11 +255,11 @@ class IslandoraSettingsForm extends ConfigFormBase {
); );
} }
else { else {
if (!preg_match("/\b(" . implode(self::TIME_INTERVALS, "|") . ")s?\b/", $expiry)) { if (!preg_match("/\b(" . implode("|", self::TIME_INTERVALS) . ")s?\b/", $expiry)) {
$form_state->setErrorByName( $form_state->setErrorByName(
self::JWT_EXPIRY, self::JWT_EXPIRY,
$this->t("No time interval found, please include one of (@int). Plurals are also accepted.", $this->t("No time interval found, please include one of (@int). Plurals are also accepted.",
['@int' => implode(self::TIME_INTERVALS, ", ")] ['@int' => implode(", ", self::TIME_INTERVALS)]
) )
); );
} }

Loading…
Cancel
Save