From 28caea63bdc1f15d0c8d8657221c390537a994f6 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 18 Apr 2011 10:51:06 +0100 Subject: [PATCH] Use db_query_bound instead of db_query --- application/core/custom_field_api.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/core/custom_field_api.php b/application/core/custom_field_api.php index 161bdb2058..b6fbefc611 100644 --- a/application/core/custom_field_api.php +++ b/application/core/custom_field_api.php @@ -825,6 +825,7 @@ function custom_field_get_linked_ids( $p_project_id = ALL_PROJECTS ) { if( !isset( $g_cache_cf_linked[$p_project_id] ) ) { + $p_project_id = (int) $p_project_id; $t_custom_field_table = db_get_table( 'custom_field' ); $t_custom_field_project_table = db_get_table( 'custom_field_project' ); @@ -874,7 +875,7 @@ function custom_field_get_linked_ids( $p_project_id = ALL_PROJECTS ) { cft.id = cfpt.field_id ORDER BY sequence ASC, name ASC"; } - $result = db_query( $query ); + $result = db_query_bound( $query ); $t_row_count = db_num_rows( $result ); $t_ids = array();