After updating to PHP 8.1, posting a message using Rules fails with

2022/12/27 17:01:50 [error] 740#740: *17830742 FastCGI sent in stderr: "PHP message: Error: Unknown named parameter $data in /var/www/html/ledgersmb.org/modules/contrib/rules/src/Core/RulesActionBase.php on line 139 #0 modules/contrib/rules/src/Core/RulesActionBase.php(139): call_user_func_array()
#1 modules/contrib/rules/src/Plugin/RulesExpression/ActionExpression.php(110): Drupal\rules\Core\RulesActionBase->execute()

... this is because PHP 8 added Named Parameters to the language, and the parameter $data was named $entity in the rule action.

Comments

freelock created an issue. See original summary.

  • freelock committed d4d5137c on 8.x-1.x
    Issue #3329853 by freelock: PHP 8.1 Compatibility issue - PHP message:...
freelock’s picture

Status: Active » Fixed

Fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.