Skip to content

Commit

Permalink
Fix custom_field_get_id_from_name() always returning false
Browse files Browse the repository at this point in the history
Commit 6a7db34 introduced an error in
the call to db_query_bound(), passing the param as a scalar value
instead of an array.

Thanks to user nimmich for noticing the issue and providing a patch.

Fixes #15264
  • Loading branch information
dregad committed Dec 6, 2012
1 parent c881373 commit 8c9038f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/custom_field_api.php
Expand Up @@ -648,7 +648,7 @@ function custom_field_get_id_from_name( $p_field_name, $p_truncated_length = nul
$c_field_name = $p_field_name . '%';
}

$t_result = db_query_bound( $query, $c_field_name );
$t_result = db_query_bound( $query, array( $c_field_name ) );

if( db_num_rows( $t_result ) == 0 ) {
return false;
Expand Down

0 comments on commit 8c9038f

Please sign in to comment.