Problem/Motivation
Steps to reproduce:
Create a new theme. In the .info.yml file include this line but don't declare any libraries underneath it or append []
.
libraries:
When installing your theme or clearing caches you should see the following:
Warning: Invalid argument supplied for foreach() in Drupal\Core\Extension\ThemeHandler->addTheme() (line 203 of core/lib/Drupal/Core/Extension/ThemeHandler.php).
Proposed resolution
Either ignore that libraries is not an array at this point, or throw a meaningful exception. Either would improve the experience.
Remaining tasks
Patch
Tests
Review
User interface changes
n/a
API changes
n/a
Data model changes
n/a