- π³πΏNew Zealand quietone
This was fixed as part of π Switch from deprecation notice to warning for non-standard placeholders in FormattableMarkup::placeholderFormat() Fixed . I am closing as a duplicate and moving credit.
If you have code like this:
drupal_set_message(t('My name is !name.', ['!name' => 'David']));
Drupal will not perform the replacement, and instead will output "My name is !name" to the screen. It will also trigger an error to notify developers about the problem.
However, if you have code like this:
drupal_set_message(t('My name is NAME.', ['NAME' => 'David']));
Drupal will still not perform the replacement (it will output "My name is NAME"). But instead of triggering an error, it will trigger an E_USER_DEPRECATED.
I don't think that makes sense. If it's broken code (not merely deprecated code) it should be an error just like the first case.
This issue is relatively minor, because it turns out Drupal logs/displays E_USER_DEPRECATED as if it were an error or a warning (so even if your development site is only configured to display errors/warnings to the screen, you'll probably still see it). That's presumably a bug though, and we shouldn't rely on it.
Also, my main interest in this issue is that it seems to be what the documentation in https://www.drupal.org/core/deprecation#how-unintended β is based on. I think that documentation should be fixed as well as a followup to this issue - E_USER_DEPRECATED should only be used if something is deprecated but still works.
Closed: duplicate
10.1 β¨
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This was fixed as part of π Switch from deprecation notice to warning for non-standard placeholders in FormattableMarkup::placeholderFormat() Fixed . I am closing as a duplicate and moving credit.