- Issue created by @lesleyfernandes
- @lesleyfernandes opened merge request.
- Status changed to RTBC
5 months ago 12:45pm 2 July 2024 - 🇨🇦Canada leducdubleuet Chicoutimi QC
I can confirm the proposed patch fixes this issue, thank you!
The facebook_comments
module in Drupal is encountering a deprecated warning on PHP 8.1 due to the order of parameters in a function declaration. Specifically, an optional parameter $mode
is declared before a required parameter $amount
in the module's facebook_comments.module
file. This parameter order is causing the $mode
parameter to be implicitly treated as a required parameter on PHP 8.1, resulting in the deprecated warning.
facebook_comments
module in a Drupal instance.The facebook_comments
module should be PHP 8.1 compatible and not generate deprecated warnings. The module's function declarations should adhere to modern PHP practices without triggering deprecated behavior.
To address the deprecated warning, it's recommended to make the $mode
parameter mandatory by removing its default value in the relevant function declaration within the facebook_comments.module
file. Since the value of $mode
is consistently set whenever the function is called, the default value is unnecessary and contributes to the deprecated behavior.
facebook_comments.module
(sites/all/modules/contrib/facebook_comments/facebook_comments.module)This issue affects the compatibility and reliability of the facebook_comments
module on PHP 8.1. By adjusting the parameter order and removing the unnecessary default value, the module can function seamlessly on both older and newer PHP versions, providing a smooth experience for website administrators and users alike.
1.0
Code
I can confirm the proposed patch fixes this issue, thank you!