Hi,
when searching for my DokuWwiki via Google using the keywords "mywikixxxx+ wikipedia" I get the following error message displayed when clicking the first hit:
Warning: Undefined array key "query" in /homepages/xx/xxx/htdocs/clickandbuilds/xxxx/dokuwiki/inc/common.php on line 1365
Warning: Cannot modify header information - headers already sent by (output started at /homepages/xx/xxx/htdocs/clickandbuilds/xxxx/dokuwiki/inc/common.php:1365) in /homepages/xx/xxx/htdocs/clickandbuilds/xxxxi/dokuwiki/inc/actions.php on line 38
However, when typing the DokuWiki address manually in the search bar, there is no error.
Any idea what the issue is and how I can fix this?
BTW how can I switch off the display of public error messages ? For safety reasons.....
Thx.
N.B: Line 1365 in common.php reads as follows:
}
$url = parse_url($INPUT->server->str('HTTP_REFERER'));
// only handle common SEs
if(!preg_match('/(google|bing|yahoo|ask|duckduckgo|babylon|aol|yandex)/',$url['host'])) return '';
$query = array();
**parse_str($url['query'], $query);**. <== Line 1365
$q = '';
if(isset($query['q'])){
$q = $query['q'];
}elseif(isset($query['p'])){
$q = $query['p'];
}elseif(isset($query['query'])){
$q = $query['query'];
}
and Line 38 in action.php reads as follows:
}
/**
* Send the given headers using header()
*
* @param array $headers The headers that shall be sent
*/
function act_sendheaders($headers) {
foreach ($headers as $hdr) header($hdr); <== Line 1365
}