Repository: pimcore/pimcore (language: php)

Issue:
[Bug]: Empty glossary line crashes rendering
### Pimcore version

11.2.3

### Steps to reproduce

Add a new line in the glossary, without any data in it

### Actual Behavior

An Exception is thrown:

An exception has been thrown during the rendering of a template ("htmlentities(): Argument #1 ($string) must be of type string, null given"). 
#0 /app/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#1 /app/vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#2 /app/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
#3 /app/vendor/twig/twig/src/Environment.php(280): Twig\TemplateWrapper->render(Array)

### Expected Behavior

The glossary should just work, because the new line should be getting data in it, but perhaps in a later stage.


Discussion / hints:

Fix patch:
diff --git a/bundles/GlossaryBundle/src/Tool/Processor.php b/bundles/GlossaryBundle/src/Tool/Processor.php
index 961fe765cb4..3276e273c7c 100644
--- a/bundles/GlossaryBundle/src/Tool/Processor.php
+++ b/bundles/GlossaryBundle/src/Tool/Processor.php
@@ -192,6 +192,9 @@ private function prepareData(array $data): array
         // fix htmlentities issues
         $tmpData = [];
         foreach ($data as $d) {
+            if (!($d['text'])) {
+                continue;
+            }
             $text = htmlentities($d['text'], ENT_COMPAT, 'UTF-8');
             if ($d['text'] !== $text) {
                 $td = $d;


Test patch: