|
From: <var...@us...> - 2021-06-09 17:18:19
|
Revision: 10280
http://sourceforge.net/p/phpwiki/code/10280
Author: vargenau
Date: 2021-06-09 17:18:16 +0000 (Wed, 09 Jun 2021)
Log Message:
-----------
Stricter tests in lib/WikiDB/backend/file.php
Modified Paths:
--------------
trunk/lib/WikiDB/backend/file.php
Modified: trunk/lib/WikiDB/backend/file.php
===================================================================
--- trunk/lib/WikiDB/backend/file.php 2021-06-09 15:24:58 UTC (rev 10279)
+++ trunk/lib/WikiDB/backend/file.php 2021-06-09 17:18:16 UTC (rev 10280)
@@ -559,8 +559,9 @@
foreach ($pagenames as $key => $val) {
$links = $this->_loadPageLinks($key);
foreach ($links as $key2 => $val2) {
- if ($val2['linkto'] == $pagename)
+ if (is_array($val2) and isset($val2['linkto']) and ($val2['linkto'] == $pagename)) {
array_push($out, $key);
+ }
}
}
return new WikiDB_backend_file_iter($this, $out);
@@ -754,7 +755,7 @@
unset($pagedata['pagename']);
$rec = array('pagename' => $pn,
'pagedata' => $pagedata);
- if (is_array($e[1])) {
+ if (is_array($e[1]) and isset($e[1]['relation'])) {
$rec['linkrelation'] = $e[1]['relation'];
}
//$rec['version'] = $backend->get_latest_version($pn);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|