creativecommons / creativecommons/vocabulary-theme
Invalid argument supplied for foreach() in page_home.php
Open
💻 aspect: code
🚦 status: awaiting triage
🛠 goal: fix
🟨 priority: medium
- Dominant language
- PHP
- Stars
- 6
- Forks
- 7
- Avg merge
- 1d 8m
- Merged PRs (30d)
- 6
Description
## Description
The production web server has multiple entries like:
```
PHP Warning: Invalid argument supplied for foreach() in /var/www/index/wp-content/themes/vocabulary-theme/page_home.php on line 200
```
Context:
https://github.com/creativecommons/vocabulary-theme/blob/245905816016ba12728cebb267e99b514b4c7ad4/src/page_home.php#L199-L213
## Expectation
Code should handle lack of `$highlight_posts` gracefully.
Contributor guide
Assessment
This issue has not been assessed yet.