diff --git a/modules/lib-search-engine.php b/modules/lib-search-engine.php index 00296f7..6b46d76 100644 --- a/modules/lib-search-engine.php +++ b/modules/lib-search-engine.php @@ -831,8 +831,9 @@ class search continue; // Skip terms we shouldn't search the page body for // Loop over the pageindex and search the titles / tags - reset($pageindex); // Reset array/object pointer - foreach($pageindex as $pagename => $pagedata) { + $obj = new ArrayObject($pageindex); + $it = $obj->getIterator(); + foreach($it as $pagename => $pagedata) { // Setup a variable to hold the current page's id $pageid = null; // Cache the page id diff --git a/modules/parser-parsedown.php b/modules/parser-parsedown.php index d1e14bd..6273dfe 100644 --- a/modules/parser-parsedown.php +++ b/modules/parser-parsedown.php @@ -1101,9 +1101,9 @@ class PeppermintParsedown extends ParsedownExtra // The page name is made safe when Pepperminty Wiki does initial consistency checks (if it's unsafe it results in a 301 redirect) $page_name = parsedown_pagename_resolve($matches_url[1]); - $internal_link_text = "[[${page_name}]]"; + $internal_link_text = "[[{$page_name}]]"; if(!empty($matches[1])) // If the display text isn't empty, then respect it - $internal_link_text = "[[${page_name}¦{$matches[1]}]]"; + $internal_link_text = "[[{$page_name}¦{$matches[1]}]]"; $result = $this->inlineInternalLink([ "text" => $internal_link_text