Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: PHP 8.2. fatal error if there are some issue with database #5220

Closed
Jimmi08 opened this issue Mar 26, 2024 · 0 comments
Closed

[Bug]: PHP 8.2. fatal error if there are some issue with database #5220

Jimmi08 opened this issue Mar 26, 2024 · 0 comments
Assignees
Labels
type: bug A problem that should not be happening
Milestone

Comments

@Jimmi08
Copy link
Contributor

Jimmi08 commented Mar 26, 2024

What e107 version are you using?

Latest Github version (just updated)

Bug description

If you have f.e. wrong database prefix, you will not get that familiar red message with class2.php error, but fatal error:

Fatal error: Uncaught Error: Undefined constant "e_LANGUAGE" in ***class2.php:1213 
Stack trace: 
#0 ***ehandlers/e_parse_class.php(5289): check_class(255) 
#1 ***ehandlers/e_parse_class.php(544): e_parse->cleanHtml('CORE_LAN8...') 
#2 ***ehandlers/admin_log_class.php(279): e_parse->toDB('CORE_LAN8', true, false, 'no_html') 
#3 ***ehandlers/admin_log_class.php(205): e_admin_log->addEvent(2, -1, 'CORE_LAN8', 'LAN_AL_CORE_LAN...', 'CORE_LAN7', false, 1, NULL) 
#4 ***class2.php(360): e_admin_log->add('LAN_AL_CORE_LAN...', 'CORE_LAN7', 2) 
#5 ***index.php(58): require_once('/data/7/8/78a5d...') 
#6 {main} thrown in ***class2.php on line 1213

How to reproduce

set wrong database prefix in config file

Expected behavior

red message about not able to connect to database

commenting those lines in check_class() helped
this should be the result, not fatal error
image

What browser(s) are you seeing the problem on?

Chrome / Brave

PHP Version

PHP 8.2

@Jimmi08 Jimmi08 added the type: bug A problem that should not be happening label Mar 26, 2024
@CaMer0n CaMer0n added this to the e107 2.4.0 milestone Mar 26, 2024
@CaMer0n CaMer0n self-assigned this Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

2 participants