diff --git a/system/src/Grav/Common/Helpers/Truncator.php b/system/src/Grav/Common/Helpers/Truncator.php index 9ec4084cb..64facbc2f 100644 --- a/system/src/Grav/Common/Helpers/Truncator.php +++ b/system/src/Grav/Common/Helpers/Truncator.php @@ -118,7 +118,7 @@ class Truncator { list($txt, $nb, $opts) = static::truncateNode($doc, $childNode, $remaining, $opts); } else if ($childNode->nodeType === XML_TEXT_NODE) { - list($txt, $nb, $opts) = static::truncateText($doc, $childNode, $remaining, $opts); + list($txt, $nb, $opts) = static::truncateText($childNode, $remaining, $opts); } else { $txt = ''; $nb = 0; @@ -141,7 +141,7 @@ class Truncator { return array($inner, $remaining, $opts); } - protected static function truncateText($doc, $node, $length, $opts) + protected static function truncateText($node, $length, $opts) { $string = $node->textContent; @@ -165,7 +165,7 @@ class Truncator { $words = $words[0]; $count = count($words); if ($count <= $length && $length > 0) { - return array($xhtml, $count, $opts); + return array($string, $count, $opts); } return array(implode('', array_slice($words, 0, $length)), $count, $opts); } diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index a4c9c0b43..99ccd702d 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -1369,8 +1369,6 @@ class Page /** @var Uri $uri */ $uri = self::getGrav()['uri']; - $include_port = false; - // get pre-route if ($include_lang && $language->enabled()) { $pre_route = $language->getLanguageURLPrefix();