Эх сурвалжийг харах

Correction de content vide por le runtime Twig markdown

Sangfroid 1 сар өмнө
parent
commit
c2268da5cd

+ 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 "";
     }
 }