Hi there,
I got
"Warning: Undefined array key "joins" in /home/www/plugins/serendipity_plugin_calendar/serendipity_plugin_calendar.php on line 234"
in Serendipity 2.4-beta1 and PHP 8.0.16
Any hints?
Regards,
Thomas
Solved: Calendar Plugin Error: Undefined array key "joins" in
Solved: Calendar Plugin Error: Undefined array key "joins" in
Last edited by moonchild on Tue Oct 18, 2022 9:22 am, edited 1 time in total.
Re: Calendar Plugin Error: Undefined array key "joins" in
So, this works in my test installation. But that could be because of something in my test installation setting that array key, and that not happening in yours.
Are you up for editing that plugin file and testing a patch?
At around line 234 of the file plugins/serendipity_plugin_calendar/serendipity_plugin_calendar.php there is this code block:
change it to this:
Save the file, reload the blog and this warning should be gone.
Alternatively you can also hide warnings like this by enabling production mode. This would happen automatically when 2.4 gets a stable release, you can active it yourself by adding
to your serendipity_config_local.inc.php.
Are you up for editing that plugin file and testing a patch?
At around line 234 of the file plugins/serendipity_plugin_calendar/serendipity_plugin_calendar.php there is this code block:
Code: Select all
if (!isset($querystring)) {
$querystring = "SELECT id, timestamp
FROM {$serendipity['dbPrefix']}entries e
{$cond['joins']}
{$cond['and']}";
}
Code: Select all
if (!isset($querystring)) {
if (! array_key_exists('joins', $cond)) {
$cond['joins'] = '';
}
$querystring = "SELECT id, timestamp
FROM {$serendipity['dbPrefix']}entries e
{$cond['joins']}
{$cond['and']}";
}
Alternatively you can also hide warnings like this by enabling production mode. This would happen automatically when 2.4 gets a stable release, you can active it yourself by adding
Code: Select all
$serendipity['production'] = true;
Re: Calendar Plugin Error: Undefined array key "joins" in
Hello Onli,
thanks, that solved the problem with this plugin, I made the change in the plugin that you suggested.
Regards,
Thomas
thanks, that solved the problem with this plugin, I made the change in the plugin that you suggested.
Regards,
Thomas
Re: Solved: Calendar Plugin Error: Undefined array key "joins" in
Then I will add this to the code in general.