|
From: <var...@us...> - 2021-06-28 10:36:35
|
Revision: 10329
http://sourceforge.net/p/phpwiki/code/10329
Author: vargenau
Date: 2021-06-28 10:36:36 +0000 (Mon, 28 Jun 2021)
Log Message:
-----------
"each" is deprecated
Modified Paths:
--------------
trunk/lib/WikiDB/backend/file.php
Modified: trunk/lib/WikiDB/backend/file.php
===================================================================
--- trunk/lib/WikiDB/backend/file.php 2021-06-28 09:25:09 UTC (rev 10328)
+++ trunk/lib/WikiDB/backend/file.php 2021-06-28 10:36:36 UTC (rev 10329)
@@ -260,10 +260,11 @@
function _loadPageLinks($pagename)
{
$pd = $this->_loadPage('links', $pagename, 0, false);
- if ($pd != NULL)
+ if ($pd != NULL) {
return $pd;
- ;
- return array(); // no values found
+ } else {
+ return array(); // no values found
+ }
}
function _savePageLinks($pagename, $links)
@@ -739,10 +740,12 @@
if (count($this->_result) <= 0)
return false;
- $e = each($this->_result);
- if ($e == false) {
+ $key = key($this->_result);
+ if ($key === null) {
return false;
}
+ $e = [$key, current($this->_result), 'key' => $key, 'value' => current($this->_result)];
+ next($this->_result);
$pn = $e[1];
if (is_array($pn) and isset($pn['linkto'])) { // support relation link iterator
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|