Skip to content

Commit

Permalink
Database API now properly sets ADOdb fetch mode
Browse files Browse the repository at this point in the history
Prior to this, the lack of global indicator for $ADODB_FETCH_MODE caused
the driver to load with default setting, since the variable was
initialized outside of its scope.
  • Loading branch information
dregad committed Nov 28, 2015
1 parent 05f919f commit f0c3959
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/database_api.php
Expand Up @@ -53,9 +53,11 @@
# @global bool $g_db_log_queries
$g_db_log_queries = ( 0 != ( config_get_global( 'log_level' ) & LOG_DATABASE ) );

# set adodb fetch mode
# set adodb to associative fetch mode with lowercase column names
# @global bool $ADODB_FETCH_MODE
global $ADODB_FETCH_MODE;
$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
define( 'ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_LOWER );

/**
* Mantis Database Parameters Count class
Expand Down

0 comments on commit f0c3959

Please sign in to comment.