Compatibility with CakePHP 2.2.4
Merge pull request #11 from ezoterik/feature

Fix warning - Invalid argument supplied for foreach
Merge branch '2.0'. Fixed conflicts