Invalid argument supplied for foreach() in list_themes()

Just wanted to share a quick annoyance that I caused while building a theme for Drupal 7. I kept on getting this error after having uploaded and enabled my theme:

Warning: Invalid argument supplied for foreach() in list_themes() (line 767 of /home/www/dev.larsbo.org/includes/theme.inc).

It turned out that the problem causing this was an error in the way I added my stylesheet in the .info file. I hade done:

stylesheets[all] = css/main.css

And of course, the right solution is:

stylesheets[all][] = css/main.css

Comments

Thank you!! This totally solved my problem.

Add new comment