public static function relations($specific = false)
{
...
foreach (static::${'_'.$rel_name} as $key => $settings)
}
It shows ErrorException [ Warning ]: Invalid argument supplied for foreach(), although static::${'_'.$rel_name} is a valid array.
Can be temporarily fixed, by adding (array):
foreach ((array)(static::${'_'.$rel_name}) as $key => $settings)
That happens if you didn't put a the relation into an array as it should be, this would be supporting bad config which is a bad thing IMO.
Also if you want to report bugs do it on Github, we don't accept bugreports here. That's not to say that we'll ignore them always, but on Github you'll always get an answer and here you'll be told to post it to Github or may be forgotten.