Hi,
Using config as in title on a development site, I get frequent messages like:
"( ! ) Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/J41/components/com_comprofiler/plugin/user/plug_cbprivacy/library/Trigger/FieldTrigger.php on line 295"
PHP8.1 has deprecated using null as an empty string in parameters. So, all calls to php_replace within CB code should be like
Code:
str_replace( '[field_id]', $fieldId, $field->params->get( 'cbprivacy_asset', '', GetterInterface::STRING ) )
instead current code
Code:
str_replace( '[field_id]', $fieldId, $field->params->get( 'cbprivacy_asset', null, GetterInterface::STRING ) )
As GetterInterface is STRING, passing an empty string as parameter fixes this deprecated warning.
Is this a real solution or is there another way ?
Thank you in advance for your answer.