Page 1 of 1

Spartacus: PHP error when looking for sidebar plugin updates

Posted: Thu Dec 10, 2009 12:38 am
by WebComPas
Hallo!

I just tried to let spartacut check if there are updates for sidebar plugins. After clicking on "New versions of sidebar plugins" the XML file could be fetched correctly. But after the corresponding info messages the following PHP error was displayed:
Warning: Invalid argument supplied for foreach() in /[...]/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 734
After looking into the PHP code, I think that the array element "$subtree['children']", which is used as the argument of foreach(), isn't an array. So this should be checked before running the loop.
Strangely enough this error could not be reproduced up to now. So it might be difficult to find the reason which cause this error. Nevertheless I think it would make sense to fix this issue.

Regards,
Pascal

Re: Spartacus: PHP error when looking for sidebar plugin updates

Posted: Thu Dec 10, 2009 10:00 am
by garvinhicking
Hi!

Which s9y version are you using? Maybe the error happened when the XML file was malformed somehow?!

Regards,
Garvin

Re: Spartacus: PHP error when looking for sidebar plugin updates

Posted: Thu Dec 10, 2009 10:53 am
by WebComPas
Hi!

Actually I'm using s9y v1.4. Unfortunately I can't say whether the XML file has been malformed, because the error is not reproducable.

Regards,
Pascal

Re: Spartacus: PHP error when looking for sidebar plugin updates

Posted: Thu Dec 10, 2009 11:22 pm
by WebComPas
Maybe the XML files are really malformed. In the template selection area I always get similar error messages:
Warning: Invalid argument supplied for foreach() in /[...]/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 823

Warning: Invalid argument supplied for foreach() in /[...]/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 823
When I open the file package_template.xml from NetMirror Firefox displays an error message about the XML content.

Re: Spartacus: PHP error when looking for sidebar plugin updates

Posted: Fri Dec 11, 2009 9:28 am
by garvinhicking
Hi!

How does the package_template(_de).xml file look in your templates_c directory?

Regards,
Garvin

Re: Spartacus: PHP error when looking for sidebar plugin updates

Posted: Fri Dec 11, 2009 3:57 pm
by WebComPas
It looks like a correct XML file. I've tried to attach it to this post but the post could only be submitted without attaching this file.

Re: Spartacus: PHP error when looking for sidebar plugin updates

Posted: Tue Dec 15, 2009 11:36 am
by 3nd3r
Same error here:

Code: Select all

Intentando acceder al URL package_sidebar_es.xml...
Descargados 132096 bytes desde la URL. Guardando el archivo como /home/pajareo/public_html/templates_c/package_sidebar_es.xml...
Data descargada con éxito.

Warning: Invalid argument supplied for foreach() in /home/pajareo/public_html/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 734
I've trying to attach package_sidebar_es.xml, but get

Code: Select all

Error 101 (net::ERR_CONNECTION_RESET): Unknow error.
and if I zip it, it's ok :wink:

Re: Spartacus: PHP error when looking for sidebar plugin updates

Posted: Tue Dec 15, 2009 1:15 pm
by garvinhicking
Hi 3nd3er!

Which s9y version exactly?=

Regards,
GArvin