Request for 'confirmed' user role

Created on 13 March 2023, over 1 year ago
Updated 14 March 2023, over 1 year ago

I am trying to submit an issue to the Workflow module project. My issue pertains to recent changes in Drupal and PHP that deprecate the passing in of a NULL parameter. It's a simple issue, I have a suggested code fix, and I am not a bot. Let me know if you have any questions.

For reference, here is my proposed issue report:
Problem/Motivation
When the table displaying past workflow changes loads it passes the comment field of the workflow change to a function that doesn't support NULL parameter inputs in Drupal 9, PHP 8. To avoid warnings when a workflow change with a blank comment is being loaded the code should be changed to change NULL parameters to an empty string.

Steps to reproduce

  1. Open the workflow of any content on PHP version 8.1.14 and Drupal version 9.5.2
  2. There should be a deprecated function warning for each workflow state change without an associated comment.

Proposed resolution
Replace the current code on line 169 of WorkflowTransitionListBuilder.php in the src folder of the workflow module:

$row['comment']['data'] = html_entity_decode($transition->getComment()); // 'class' => array('log-comment')

with this new code:

if($transition->getComment() == NULL) {
  $row['comment']['data'] = ""; 
} 
else {
  $row['comment']['data'] = html_entity_decode($transition->getComment()); // 'class' => array('log-comment') 
}
📌 Task
Status

Fixed

Component

User account

Created by

🇺🇸United States Dr_Penguin2275

Live updates comments and jobs are added and updated live.
  • Spam false positive

    This tag is used for requests to become a confirmed user for users whose posts have been erroneously flagged as spam from the anti-spam system.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024