Skip to content

Commit

Permalink
Fix #19637: oci8 MetaColumns uppercase
Browse files Browse the repository at this point in the history
db_field_exists() does not work with oci8 due to the driver's use of
uppercase column names.
  • Loading branch information
dregad committed Apr 18, 2015
1 parent cd8c758 commit 7aaabd3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/database_api.php
Expand Up @@ -683,6 +683,13 @@ function db_index_exists( $p_table_name, $p_index_name ) {
*/
function db_field_exists( $p_field_name, $p_table_name ) {
$t_columns = db_field_names( $p_table_name );

# ADOdb oci8 driver works with uppercase column names, and as of 5.19 does
# not provide a way to force them to lowercase
if( db_is_oracle() ) {
$p_field_name = strtoupper( $p_field_name );
}

return in_array( $p_field_name, $t_columns );
}

Expand Down

0 comments on commit 7aaabd3

Please sign in to comment.