Revert "Prevent Warning: Invalid argument supplied for foreach() in system.c"

This reverts commit f507d7868e5d3478b722851e4f192c09f74c4b09.