Welcome Guest, Not a member yet? Register   Sign In
Error view exception is not showing the source code in PHP8.3 - Codeigniter v4.4.4
#3

(This post was last modified: 01-05-2024, 02:10 AM by davis.lasis.)

Same here.
CodeIgniter 4.4.4
PHP 8.3.1

ErrorException has empty <pre><code></code></pre>

Although i have no issues with dev or prod mode.

[Image: fnPD6Kp]

Not sure whats about attaching images, bet there is direct link
https://ibb.co/fnPD6Kp

So, i did some tests and debugging.
I found out that empty code appears in PHP 8.1 as well.
Maybe something related to apache, as yesterday i changed my Laragon setup 
- apache - http-2.4.54 to http-2.5.8
- php - 8.1 to 8.3.1

Quick system fix is to disable 2 lines
/system/Debug/BaseExceptionHandler.php
line 185 //$source = str_replace('<br />', "\n", $source[1]);
line 186 //$source = explode("\n", $source);

With those commented out errors shows as intended
I havent dig entirely through, and because of lack of time, i am not ready to provide pull request or a proper fix at this moment
[Image: j4ybfBm]

https://ibb.co/j4ybfBm
Reply


Messages In This Thread
RE: Error view exception is not showing the source code in PHP8.3 - Codeigniter v4.4.4 - by davis.lasis - 01-05-2024, 01:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB