Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Kirby 3.6 : Str::template() parameters deprecated #219

Closed
Tracked by #3485
ralfgoeke opened this issue Oct 9, 2021 · 2 comments · Fixed by #220
Closed
Tracked by #3485

Incompatibility with Kirby 3.6 : Str::template() parameters deprecated #219

ralfgoeke opened this issue Oct 9, 2021 · 2 comments · Fixed by #220

Comments

@ralfgoeke
Copy link

Describe the bug

In Kirby 3.6.0 beta 3 an error is thrown in …/vendor/mzur/kirby-uniform/src/Actions/EmailAction.php Line 112

Str::template(): the parameters $fallback, $start and $end have been deprecated and throw a deprecation warning. Use instead an $options array with fallback, start and/or end keys as third parameter.

Source: https://getkirby.com/releases/3.6/deprecated

@ralfgoeke
Copy link
Author

This seems to work, but my not so overwhelming PHP knowledge suggests to not trust this blindly.^^

$subject = Str::template($this->option(
  'subject',
  [
    'start' => I18n::translate('uniform-email-subject'),
    'end' => $templatableItems,
    'fallback' => '',
  ]
));

@mzur
Copy link
Owner

mzur commented Oct 10, 2021

I've released a new version with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants