diff --git a/system/includes/functions.php b/system/includes/functions.php
index b0342d3..a35f655 100644
--- a/system/includes/functions.php
+++ b/system/includes/functions.php
@@ -2250,7 +2250,7 @@ function menu($class = null)
$html = parseNodes($nodes, null, $class);
libxml_use_internal_errors(true);
$doc = new DOMDocument();
- $doc->loadHTML($html);
+ $doc->loadHTML('' . $html);
$finder = new DOMXPath($doc);
$elements = $finder->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' dropdown-menu ')]");
@@ -3334,7 +3334,7 @@ function replace_href($string, $tag, $class, $url)
// Load the HTML in DOM
$doc = new DOMDocument();
- $doc->loadHTML($string);
+ $doc->loadHTML('' . $string);
// Then select all anchor tags
$all_anchor_tags = $doc->getElementsByTagName($tag);
foreach ($all_anchor_tags as $_tag) {