- Status changed to Fixed
over 1 year ago 5:41pm 23 August 2023 Automatically closed - issue fixed for 2 weeks with no activity.
\Drupal\commerce_webform_order\Plugin\WebformHandler\CommerceWebformOrderHandler::postSave() adds a log message when an order is created:
// Log message in Webform's submission log.
$context = [
'@order_id' => $this->cart->get('order_id')->getString(),
'@owner_email' => $this->cart->getEmail(),
'webform_submission' => $webform_submission,
'handler_id' => $this->getHandlerId(),
'data' => [],
];
if ($this->cart->getEmail() !== NULL) {
$this->getLogger('webform_submission')->notice("Order #@order_id created to '@owner_email'.", $context);
}
else {
$this->getLogger('webform_submission')->notice("Order #@order_id created.", $context);
}
When this->cart->getEmail()
is NULL, the @owner_email parameter triggers a PHP warning:
Deprecated function: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Component\Utility\Html::escape()
Update the log message so it does not define a string argument with a NULL value.
None.
None.
None.
Fixed
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed - issue fixed for 2 weeks with no activity.