Skip to content

Bug: CI4 Undefined Variable returns error 500 and stops the script #8351

@mywebmanavgat

Description

@mywebmanavgat

PHP Version

7.4, 8.0, 8.1, 8.2

CodeIgniter4 Version

4.4.3

CodeIgniter4 Installation Method

Manual (zip or tar.gz)

Which operating systems have you tested for this bug?

Windows

Which server did you use?

apache

Database

None

What happened?

Ci4 Undefined Variable returns error 500 and stops the script on that line.

Also in ci3, even if these errors are not shown on the screen in production mode, ci3 logs these errors and shows you the errors for you to debug.

Ci4 interrupts and kills the process with a 500 error on undefined variable error.
If you set error_log(0) for ci4 production.php, it will not generate 500 errors, it will continue processing as in natural php, but it will not record any logs for this error.

Steps to Reproduce

I have no idea about this but exceptionHandler should be customizable.

Expected Output

Expected output, in production mode, the native php script continues processing.

Anything else?

I recorded a video for ci3 and ci4. You can understand what I want to explain more clearly by watching the video.

https://www.youtube.com/watch?v=eoKgtHeXohM

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