diff options
author | Michael Hamann <michael@content-space.de> | 2011-02-24 23:53:51 +0100 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2011-02-24 23:53:51 +0100 |
commit | 7233c152c0a107c0f12dbc09f5493022b264dddb (patch) | |
tree | e9a0f0ccc46921985c2441c7ce00f8b07de09970 /inc | |
parent | f77fc90de1e477b721442757cd7413f91cccc044 (diff) | |
download | rpg-7233c152c0a107c0f12dbc09f5493022b264dddb.tar.gz rpg-7233c152c0a107c0f12dbc09f5493022b264dddb.tar.bz2 |
Fix pass by reference error, always return an array in lookupKey()
Diffstat (limited to 'inc')
-rw-r--r-- | inc/fulltext.php | 3 | ||||
-rw-r--r-- | inc/indexer.php | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/inc/fulltext.php b/inc/fulltext.php index 891558f96..8155325ee 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -234,7 +234,8 @@ function _ft_pageLookup(&$data){ } } if ($in_title) { - foreach ($Indexer->lookupKey('title', "*$id*") as $p_id) { + $wildcard_id = "*$id*"; + foreach ($Indexer->lookupKey('title', $wildcard_id) as $p_id) { if (!isset($pages[$p_id])) $pages[$p_id] = p_get_first_heading($p_id, false); } diff --git a/inc/indexer.php b/inc/indexer.php index 5aa321d46..eaab7736a 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -566,7 +566,12 @@ class Doku_Indexer { unset($words); // free the used memory + // initialize the result so it won't be null $result = array(); + foreach ($value_array as $val) { + $result[$val] = array(); + } + $page_idx = $this->_getIndex('page', ''); // Special handling for titles |