Code: Select all
PHP Warning: Illegal string offset 'lang_selected' in (server path)/include/functions_config.inc.php on line 993
To pinpoint the cause, I've cross-checked the access log of the server with the error. The error apparently occurred when a page request is made in the form of:
Code: Select all
http://(blog URL)/index.php?url=archives/(blog page).html&serendipity
Code: Select all
http://(blog URL)/index.php?url=archives/(blog page).html&serendipity[lang_selected]=default
Code: Select all
http://(blog URL)/archives/(blog page).html&serendipity
I can't prevent someone entering a malformed URL - these requests were tracked down to a spam bot in Ukraine. But I would like the functions_config_inc.php to handle the error gracefully so that a PHP warning isn't issued every time. The code around line 993 is:
Code: Select all
elseif (!empty($serendipity['languages'][$serendipity['GET']['lang_selected']])) {
if ($serendipity['expose_s9y']) serendipity_header('X-Serendipity-InterfaceLangSource: GET');
$lang = $serendipity['GET']['lang_selected'];
}
P.S. I'm currently using version 1.7.8.