Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Bug in Orm\Model
  • 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.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion