Repository navigation
Commit d68cb4b
committed
🛡️ Respect log_errors setting before writing exceptions to log file
Wrap `erLhcoreClassLog::write(print_r($e, true))` calls in both `lhc_web/index.php` and `erLhcoreClassModule::runModule()` with a check of the `site` > `log_errors` config setting.
🎯 Why: previously exception details were always written to the log file regardless of user configuration, causing unwanted files and potentially leaking sensitive data. Now logging only happens when explicitly enabled — consistent with the existing behavior in `defaultExceptionHandler()` and `logSlowRequest()`. 🔒1 parent 0608846 commit d68cb4b
2 files changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
| |||
0 commit comments