mantisbt/mantisbt — pull request #288 by grangeway (2014-08-31 00:04:15+00:00)
Title: Fix error in install_update_history_long_custom_fields

The following code snippet:

$t_query = 'SELECT name FROM ' . db_get_table('custom_field');;
$t_result = db_query_bound( $t_query );
$t_field = db_fetch_array( $t_result ) ;
var_dump($t_field);

Returns:
array (size=1)
'name' => string 'Fixed in Release' (length=16)

i.e. $t_field[0] is always NULL.

Upgrade schema queries should reference the field name.