added error to foreach callback.
Merge branch 'master' of https://github.com/knightso/base