Skip to content
Snippets Groups Projects
Commit b2ba94a0 authored by Daniel Moberly's avatar Daniel Moberly Committed by Daniel Moberly
Browse files

Issue #3349189 by Daniel.Moberly: Deprecated: preg_replace(): Passing null to...

Issue #3349189 by Daniel.Moberly: Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /app/web/modules/contrib/fontawesome/fontawesome.module on line 431
parent 68aad273
Branches
Tags
No related merge requests found
......@@ -428,7 +428,7 @@ function fontawesome_entity_presave(EntityInterface $entity) {
foreach ($fields as $field) {
// Find and replace SVG strings with original icon HTML.
$fieldValue = $field->getValue();
$fieldValue['value'] = preg_replace('%<svg .*?class="svg-inline--fa.*?<\/svg><!--\s?(<(span|i).*?<\/(span|i)>).*\s?-->%', '$1', $fieldValue['value']);
$fieldValue['value'] = preg_replace('%<svg .*?class="svg-inline--fa.*?<\/svg><!--\s?(<(span|i).*?<\/(span|i)>).*\s?-->%', '$1', $fieldValue['value'] ?? '');
$field->setValue($fieldValue);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment