After switching to PHP8 appeared notice "Deprecated: Required parameter $node follows optional parameter $account in /workbench_moderation.module on line 1657"

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Pavel_SPN created an issue. See original summary.

Pavel_SPN’s picture

Issue summary: View changes

I propose just remove "= NULL" for the $account because below in the code there is a check for this variable:

  if (empty($account)) {
    $account = $GLOBALS['user'];
  }
Pavel_SPN’s picture

Pavel_SPN’s picture

Issue summary: View changes
poker10’s picture

I think the patch looks good, thanks!

poker10’s picture

Status: Needs review » Reviewed & tested by the community
Alina Basarabeanu’s picture

Patch #3 works on Drupal core 7.91, PHP 8.0.21 and Workbench Moderation 7.x-3.0 version
Is there any chance to get merged into dev or a new stable release for Drupal 7?

peezy’s picture

I can confirm that #3 is working on PHP 8.0 and Drupal 7.98 as well.

anrikun’s picture

+1 for patch #3