Fix warning - Invalid argument supplied for foreach
Merge branch 'feature' into admin_plugin