thecgmguy
Whenever I perform a search, I get the following error at the bottom of the search results:
Warning: Invalid argument supplied for foreach() in c:\inetpub\wwwroot\dokuwiki\inc\indexer.php
What's strange is that the page seems to return results fine. What could be going on?
thecgmguy
The complete error is:
Warning: Invalid argument supplied for foreach() in c:\inetpub\wwwroot\dokuwiki\inc\indexer.php on line 314
blackfog
Maybe with a bit more infos we could help you: DW version? OS? Hosted service?
BlackFog
techfan
Not sure what happened with this, but we have the same issue. I am finally getting around to trying to fix it because I would like to be able to use search. For me I get this error any time there are results and it is trying to list the items. I am using the latest 2008-05-05 version. I am running on IIS on 2003 on our own server. I assume this user was doing the same thing because of the c:\inetpub path.
Our error: Warning: Invalid argument supplied for foreach() in path_to_dokuwiki\inc\indexer.php on line 564
The offending line of code is a unique foreach currently on line 564:
foreach ($hits as $hitkey => $hitcnt) {
Just previously $hits is assigned (by reference or directly linked to the same object, if syntax is same as C++) something &$docs. . .not sure if that is the real thing it is complaining about. It appears to be the only assignment of that type in the entire file (except in the function variable references of each function). I haven't done much in php, so I am not sure why that statement would give trouble. . .
I changed the code to use $docs instead of the linked $hits and it stops failing, but I get numbers as results instead. . .like:
5*52: 0 Hits with the link going nowhere. . .
Any suggestions?
It does display matches in page_names properly if there is such a match, then gives the error below when trying to display the results found in the text I assume.