mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-21 16:13:00 +00:00
Replace deprecated reset(object)
Calling `reset()` on an object causes warnings starting in PHP 8.2. This commit replaces one instance with ArrayIterator object and getIterator() method following a recommendation in the deprecation notice RFC.
This commit is contained in:
parent
484f71fc6c
commit
3abad2e61e
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue