Skip to content
Snippets Groups Projects
Commit 25e989b5 authored by Eric Smith's avatar Eric Smith Committed by Joseph Olstad
Browse files

git commit -m 'Issue #3388979 by ericgsmith: PHP 8.1 deprecated function...

git commit -m 'Issue #3388979 by ericgsmith: PHP 8.1 deprecated function warning ' --author="Eric Smith <13226-ericgsmith@users.noreply.drupalcode.org>"
parent 1db16702
No related branches found
No related tags found
1 merge request!1Issue #3388979: Fix PHP 8.1 deprecated function warning
......@@ -28,16 +28,16 @@ class TextSummaryFormatter extends FormatterBase {
$elements = [];
foreach ($items as $delta => $item) {
$elements[$delta] = array(
if (empty($item->summary)) {
continue;
}
$elements[$delta] = [
'#type' => 'processed_text',
'#text' => NULL,
'#text' => $item->summary,
'#format' => $item->format,
'#langcode' => $item->getLangcode(),
);
if (!empty($item->summary)) {
$elements[$delta]['#text'] = $item->summary;
}
];
}
return $elements;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment