diff --git a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
index a854c8de238bb6712582faffdd2f85b0f0662d76..8ed02235f2f0436e079922deebb2d7abcf936091 100644
--- a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
+++ b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
@@ -1879,7 +1879,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
      */
     public function stdWrap_stripHtml($content = '')
     {
-        return strip_tags($content);
+        return strip_tags((string)$content);
     }
 
     /**
@@ -1919,9 +1919,9 @@ class ContentObjectRenderer implements LoggerAwareInterface
     public function stdWrap_htmlSpecialChars($content = '', $conf = [])
     {
         if (!empty($conf['htmlSpecialChars.']['preserveEntities'])) {
-            $content = htmlspecialchars($content, ENT_COMPAT, 'UTF-8', false);
+            $content = htmlspecialchars((string)$content, ENT_COMPAT, 'UTF-8', false);
         } else {
-            $content = htmlspecialchars($content);
+            $content = htmlspecialchars((string)$content);
         }
         return $content;
     }