Hello,
I have installed the preset module but I am getting the following warning error while enabled the module (warning: Invalid argument supplied for foreach() in /var/aegir/drupal_platforms/sundaram6.20/sites/music.brahma.neokrish.co.in/modules/presets/presets.admin.inc on line 166). I am using PHP 5.3.2-1ubuntu4.5 server. Please assist me in finding out whats going wrong.
Comments
Comment #1
pinin4fjords commentedI'm experiencing the same error. I'm using a basic (non-aegir) setup on Fedora 11 with Drupal 6.19 and php 5.2.13. Would appreciate any pointers.
Comment #2
toddwshaffer commentedI'm also experiencing the same error. Everything in presets is working as expected, just a nice red error box exposed at the top of the modules display page (the error only displays there).
Drupal 6.2
GoDaddy (god knows what type of server, it's just a test installation)
I'll be installing this module on an Ubuntu Amazon EC2 server later today, I'll report back on whether or not the error reports there, and with it which version of OS/PHP/Apache/etc I'm running.
Comment #3
savinsur commentedSame issue here;
Invalid argument supplied for foreach() in /var/www/vhosts/xxxxxxxxxx.com/httpdocs/sites/all/modules/presets/presets.admin.inc on line 48
Comment #4
randallknutson commentedI'll take a look into this. I thought I had it fixed but I guess not.
Comment #5
solanadesign commentedAnyone have a clue on how to fix this one? I just installed Presets and it's throwing the same error.
Comment #6
alfthecat commented+1 Getting the same error
Comment #7
sravanglitter commentedWrongly assigned to myself
Comment #8
zibretni commentedThis is caused by an empty array.
If you put :
if ($preset_info['modules']>0) {
before :
foreach($preset_info['modules'] as $module => $info) {
and :
{
before :
return $modules;
Then the error dissapear.
But I did not figured out why there was an empty error.
Comment #9
DolfAndringa commentedI am getting the same error here with a fully updated D6 site. Is there any activity on this bug?
Comment #10
loopy29 commentedSame problem here...
Comment #11
Observer123 commentedalso got warning
Comment #12
ndwilliams3 commentedrc5 shows a commit to fix the issue. I updated to rc5, but I am still getting the error.
Comment #13
BrockBoland commentedThis is definitely related to #1090576: Cannot use object of type stdClass as array... module line 74: modules that are not implementing
hook_presets()have their ownmodulename_presets()functions defined for their own use, and return values that are not expected. As such,presets_get_presets()returns invalid data.I'm marking this as a dupe. Please see comment #5 on that other issue for more detail.