Browse Source

Correction de content vide por le runtime Twig markdown

Sangfroid 1 month ago
parent
commit
c2268da5cd
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/Twig/AppRuntimeExtension.php

+ 5 - 2
src/Twig/AppRuntimeExtension.php

@@ -14,8 +14,11 @@ class AppRuntimeExtension implements RuntimeExtensionInterface
     {
     {
     }
     }
 
 
-    public function parse(string $content): string
+    public function parse(?string $content): string
     {
     {
-        return $this->markdownParser->convertToHtml($content);
+        if ($content) {
+            return $this->markdownParser->convertToHtml($content);
+        }
+        return "";
     }
     }
 }
 }