View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017263 | mantisbt | bugtracker | public | 2014-04-28 06:46 | 2014-12-08 02:08 |
Reporter | dregad | Assigned To | dregad | ||
Priority | high | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.0dev | ||||
Target Version | 1.3.0-beta.1 | ||||
Summary | 0017263: config_get_global() returns default value for global variables overriden in config_inc.php | ||||
Description | While executing the admin checks I noticed a failure on existence of config_inc.php even though the file was present; displaying verbose errors showed a SYSTEM NOTICE: Undefined variable: t_field_comment I found that strange since this is mysql-only code and I was configured for postgres. Tracing shows that config_get_global(db_type) call in db_is_mysql() returns 'mysqli' despite the fact that $g_db_type == 'pgsql' in my config_inc.php git bisect says the problem is 4b173463c2715c7dfa12dc37b6663df19930e594 (0016850) | ||||
Tags | No tags attached. | ||||
This is a blocking issue as it causes failures or unexpected behavior for non-mysql database engines. |
|
Reminder sent to: vboctor Victor, The problem seems to be caused by your moving of config_inc.php's inclusion in core.php until after the initialization of some of the core api's. Can you explain the rationale behind that ? Please review proposed fix at https://github.com/mantisbt/mantisbt/pull/170 |
|
I've responded to the pull request, thanks Damien. |
|
MantisBT: master f4989d49 2014-04-28 02:59 Details Diff |
core.php: move config_inc.php include earlier in the file This fixes a regression introduced by the new config folder commit 4b173463c2715c7dfa12dc37b6663df19930e594: global variables overriden in config_inc.php are set to their default value in the config cache, causing config_get_global() to return an incorrect value. Moving the code to include the config_inc.php file back to its previous location (immediately after config_defaults_inc.php and before initializing the various APIs) fixes the problem. Fixes 0017263 |
Affected Issues 0017263 |
|
mod - core.php | Diff File | ||
MantisBT: master 720e823e 2014-04-28 09:45 Details Diff |
Revert crypto_init() to use config_get_global() Following fix for issue 0017263, it is no longer necessary to rely on use of global variable. |
Affected Issues 0017263 |
|
mod - core/crypto_api.php | Diff File |