Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
[ERROR] Email
  • I don't know why when i set up email with default setting i get error this
    image

    this is how I call email and then I got that error :
    \Email::forge();
    when I debug it, i got "static::$_defaults" value was null
    so i check it that function "_init" doesn't get called when I call that.
    and after I add "self::_init();" on the top line of "forge" function it works;

    Is that code is really get error or maybe i just set it wrong?
  • You have an error somewhere.

    I my code, line 65 is

    $config = \Arr::merge($setup, $config);

    which suggest your config file is not correct, because $config is an empty array() when you call forge() without arguments, and $setup is created by

    empty($setup) and $setup = \Config::get('email.default_setup', 'default');
    is_string($setup) and $setup = \Config::get('email.setups.'.$setup, array());

  • that was an error at

    $setup = \Arr::merge(static::$_defaults, $setup);
    $config = \Arr::merge($setup, $config);

    and my config i copy it from package and put it on my config
    and then i just add my setting on setups => default
  • Never seen the issue before. So it must be something local.
  • somehow in php 5.3.8.
    i think your _init() didn't run when i call forge statically.
  • HarroHarro
    Accepted Answer
    _init() is called by the autoloader on first load, it doesn't matter what triggers the load of the class.

    If this would be a bug in the Email class, it would be unusable since everyone would have this issue. But that is not the case, so the issue is elsewhere.

Howdy, Stranger!

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

In this Discussion