Skip to content

Bug: defined() used for function #1173

@FrancoisChaumont

Description

@FrancoisChaumont

PHP Version

8.3

CodeIgniter4 Version

4.5.4

Shield Version

dev-develop 223fbd9

Which operating systems have you tested for this bug?

Linux

Which server did you use?

apache

Database

MySQL 8.0.39

Did you customize Shield?

No

What happened?

In an attempt to create an email_helper and override the emailer function the system produces an error trying to redefine that function because the verification of a previously defined function of identical name is done using defined instead of function_exists.

Steps to Reproduce

Copy codeigniter4/shield/src/email_helper.php into app/Helpers

Expected Output

No error when overriding the emailer function

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions