1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-09-19 20:25:57 +00:00

Merge pull request #248 from neapsix/patch-php82-2

Fixes to deprecation warnings starting in PHP 8.2
This commit is contained in:
Starbeamrainbowlabs 2024-09-05 02:32:29 +01:00 committed by GitHub
commit 63c59ea151
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -831,8 +831,9 @@ class search
continue; // Skip terms we shouldn't search the page body for continue; // Skip terms we shouldn't search the page body for
// Loop over the pageindex and search the titles / tags // Loop over the pageindex and search the titles / tags
reset($pageindex); // Reset array/object pointer $obj = new ArrayObject($pageindex);
foreach($pageindex as $pagename => $pagedata) { $it = $obj->getIterator();
foreach($it as $pagename => $pagedata) {
// Setup a variable to hold the current page's id // Setup a variable to hold the current page's id
$pageid = null; // Cache the page id $pageid = null; // Cache the page id

View file

@ -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) // 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]); $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 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([ $result = $this->inlineInternalLink([
"text" => $internal_link_text "text" => $internal_link_text