mcbSolutions / Pico-Plugins

Plugins for Pico - Pico is a stupidly simple, blazing fast, flat file CMS.
MIT License
12 stars 8 forks source link

Warning: Invalid argument supplied for foreach - by mcb_random.php #2

Closed ghost closed 7 years ago

ghost commented 8 years ago

Hello Developers,

I need your support.

I have just installed the plugin mcb_random.php and get this error message in the frontend under /admin.

Warning: Invalid argument supplied for foreach() in /www/htdocs/xxxxxxxxxx/plugins/mcb_random.php on line 27
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/xxxxxxxxxx/plugins/mcb_random.php:27) in /www/htdocs/xxxxxxxx/lib/Pico.php on line 306
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/xxxxxxxxx/plugins/mcb_random.php:27) in /www/htdocs/xxxxxxxxx/plugins/pico_admin/pico_admin.php on line 134

How can I solve this problem.

I have the file mcb_random.php to folder /plugins uploaded and then inserted under /config/config.php this line:

// $Config ['mcb_random'] [] = 'Text 1; text 2; Image; Image title';

But apparently there's something wrong.

Can you help me maybe?

Thanks in advance.

mcbSolutions commented 8 years ago

Hi Alex,

which version of pico you are using? Did you to uncomment the line? $Config ['mcb_random'] [] = 'Text 1; text 2; Image; Image title';

ghost commented 8 years ago

Hi, I use the latest version of Pico and this line is commented out, because all the other lines are also uncommented in config.php.

I thought that you have to make it so.

I have uninstalled Pico again. I install it in time again and look at me again.

mcbSolutions commented 8 years ago

Hi,

the message printed by the system says, that $config['mcb_random'] is not set.

please try this code in config.php: $config['mcb_random'][] = 'Text 1;text 2;Image;Image title'; $config['mcb_random'][] = 'Text 3;text 4;Image;Image title';