Form module error
  • I am trying the Forms module for the 1st time, and having located the 'parser_allowed_functions' config array in MY_Fuel.php (incidentally, the module docs refer to editing the parser config file instead of this) and adding the 'form' function, I can render a form OK via the WYSIWYG, but with a lot of

    A PHP Error was encountered
    Severity: Notice

    Message: Array to string conversion

    Filename: libraries/Fuel_forms.php

    Line Number: 1771

    errors. I'm using Fuel v1.4, under PHP 7.
  • What does line 1771 look like for you in Fuel_forms.php? Do you have the latest version of it by chance?
  • Line 1771 is

    return is_true_val($this->$found[1]);

    It's the master branch from Github, from last week.
  • What seems to be happening is that some $found[1] values, whilst strings, do not evaluate as string properties of Fuel_forms class? eg one value that trips the error is 'javascript_submit'. Could the value $this->javascript_submit itself be an array? I'm not sure if that is a dynamically created property?

  • That line should be:
    return !empty($this->{$found[1]});
    It's in the develop branch. I've merged it into the master.
  • That works for me, thanks!
  • Could the module documentation be updated to refer to the proper config file? I ran into this same problem (creating and editing the wrong config file) today.
  • Sure thing... I've updated it.

Howdy, Stranger!

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