Skip to content

[Helper] form_open() not insert csrf field #7822

Description

@neznaika0

PHP Version

8.2

CodeIgniter4 Version

4.3.7

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

cli-server (PHP built-in webserver)

Database

No response

What happened?

See https://forum.codeigniter.com/showthread.php?tid=88247&pid=411790#pid411790
If in app/Config/Filters.php "csrf" have empty array "except" CSRF field not write in HTML.
If "except" filled - all work.

Steps to Reproduce

Set "csrf" => ["except" => []] , insert form_open() in template and see source code. csrf field not installed

Expected Output

Insert token if except empty array

Anything else?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions