groenewege/ggAsseticPlugin — Issue #1: Bug when no partials defined.
Author: alfrekjv
Created: 2011-11-30 00:31:07+00:00
State: open

Hey there, I tried to load your plugin, but I don't have/want to use partials, so I got an error like the following:

Warning: Invalid argument supplied for foreach() in ../../plugins/ggAsseticPlugin/modules/ggAssetic/actions/actions.class.php on line 84

I found that you just can't do it, and the problem relies here:

foreach ($config[$name]['partials'] as $partial) {
}

What I propose is to validate if the $config[$name]['partials'] exists before do the foreach.

if ($config[$name]['partials']) {
foreach ($config[$name]['partials'] as $partial) {
.... foreach code here ....
}
}

Look forward to hear from you, I hope this helps someone else.

Regards,

Alfredo J.