diff --git a/CHANGELOG.md b/CHANGELOG.md index 51a2a18753..09c19bce43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,10 @@ 1. [](#improved) * Refactored `onPageNotFound` event to fire after `onPageInitialized` * Follow symlinks in `Folder::all()` - * Twig variable `base_url` now supports multi-site by path feature + * Twig variable `base_url` now supports multi-site by path feature 1. [](#bugfix) * Quietly skip missing streams in `Cache::clearCache()` + * Fix issue in calling page.summary when no content is present in a page # v1.1.4 ## 09/07/2016 diff --git a/system/src/Grav/Common/Helpers/Truncator.php b/system/src/Grav/Common/Helpers/Truncator.php index 4f67a56c1b..8f02ebcb1a 100644 --- a/system/src/Grav/Common/Helpers/Truncator.php +++ b/system/src/Grav/Common/Helpers/Truncator.php @@ -123,6 +123,10 @@ public static function truncateLetters($html, $limit = 0, $ellipsis = "") */ public static function htmlToDomDocument($html) { + if (!$html) { + $html = '

'; + } + // Transform multibyte entities which otherwise display incorrectly. $html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');