Skip to content

Bug: form_open with no URL supplied #8752

Closed
@richard-keasley

Description

@richard-keasley

PHP Version

8.1

CodeIgniter4 Version

4.5.0

CodeIgniter4 Installation Method

Manual (zip or tar.gz)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

apache

Database

MySQL

What happened?

When using the helper form_open() with no URL, an error is thrown:
str_contains(): Argument #1 ($haystack) must be of type string, CodeIgniter\HTTP\SiteURI given

Steps to Reproduce

echo form_open();

Expected Output

I expect the current_url(false) (a string) to be used as a URL.

form_helper, line 34
$action = current_url(true);
returns a CodeIgniter\HTTP\SiteURI

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix themduplicateIssue or pull request duplicates an already existing issue/pull request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions