getgrav / getgrav/grav-plugin-admin
Array to string conversion by switching PHP Version
- Dominant language
- PHP
- Stars
- 377
- Forks
- 225
- Avg merge
- 11h 51m
- Merged PRs (30d)
- 4
Description
I switched to PHP 8.0. On other projects it worked flawlessly. Everything in the admin area seems to work, except for the content management (pages). Temporarily I switched to PHP 7.4 to work with GRAV. However, in this project I get the following error:
An exception has been thrown during the rendering of a template ("Array to string conversion").
/user/plugins/form/templates/forms/fields/select/select.html.twig
value="{{ akey }}"
>
{{ avalue|raw }}
{% elseif item_value is iterable %}
{% set optgroup_label = item_value|keys|first %}
{% for subkey, suboption in field.options[key][optgroup_label] %}
{% set subkey = subkey|string %}
{% set item_value = (field.selectize and field.multiple ? suboption : subkey)|string %}
{% set selected = (field.selectize ? suboption : subkey)|string %}
{{ suboption|t|raw }}
{% endfor %}
{% else %}
{% set val = (field.selectize and field.multiple ? item_value : key)|string %}
{% set selected = (field.selectize ? item_value : key)|string %}
{{ item_value|t|raw }}
{% endif %}
{% endfor %}
{% endblock %}
Arguments
"An exception has been thrown during the rendering of a template ("Array to string conversion")."
Contributor guide
Assessment
This issue has not been assessed yet.