Page 1 of 1

serendipity_plugin_mycalendar.php bug?

Posted: Sat Sep 09, 2006 9:34 am
by JWalker
Hello,
I think there is a bug in serendipity_plugin_mycalendar.php plugin (1.17 2006/08/15 07:36:04), serendipity 1.0.
In administrative menu for plugin selection, when I press the link for sidebar plugin list this appears:

Code: Select all

Fatal error: Can't use function return value in write context in D:\biz\apps\serendipity\plugins\serendipity_event_mycalendar\serendipity_plugin_mycalendar.php on line 145
Here is what is around 145 line:

Code: Select all

$dayout = serendipity_strftime($datefm, $item['eventdate'], false);
 /*145 line*/if (!empty($item['eventdate2']) && $item['eventdate'] != $item['eventdate2'] && trim($datefm2) != '') {
    $dayout .= '<span class="s9y_mc_date2"> - ' . serendipity_strftime($datefm2, $item['eventdate2'], false) . '</span>';
}
I deleted serendipity_event_mycalendar folder from the plugins folder and then the sidebar plugins list appeared. Then returned back the plugin at its place and the error returned too.
Note: I used this plugin for several months, then uninstalled it but did not deleted from the plugins folder.

Posted: Mon Sep 11, 2006 4:41 pm
by judebert
The code looks fine; I don't see a function return value used for writing on that line. Weird.

Additionally weird: I just installed My Calendar via SPARTACUS, and it claims v0.9. Where did you get 1.17?

Posted: Mon Sep 11, 2006 10:34 pm
by JWalker
The version is 0.9:

Code: Select all

        $propbag->add('version',       '0.9');
1.17 is in CVS Id keyword expansion at the very first line of the file:

Code: Select all

<?php # $Id: serendipity_plugin_mycalendar.php,v 1.17 2006/08/15 07:36:04 garvinhicking Exp $
I used this plugin for several months, then removed it. The table serendipity_mycalendar does not contains any rows now. I will not use this plugin, but was suprised that even uninstalled it does something [wrong]. So I deleted its folder and now all is OK.

Posted: Tue Sep 12, 2006 9:03 am
by garvinhicking
Hi!

Could it be that you are also having another version of that plugin lieing around? In older versions there was a problem using "empty(trim(XXX))" in combination, which was invalid. But it got removed in the recent versions, and it lead to exact the error you were getting.

HTH,
Garvin