Skip to content

Commit

Permalink
Call db_query_bound() with array() instead of null
Browse files Browse the repository at this point in the history
This is not strictly necessary right now, but replacing known occurences
avoids future refactoring should we decide to change the default value
for $p_arr_parms to array() later on.
  • Loading branch information
dregad committed Jul 7, 2014
1 parent fbf016c commit c726ff7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/project_hierarchy_api.php
Expand Up @@ -172,7 +172,7 @@ function project_hierarchy_cache( $p_show_disabled = false ) {
WHERE $t_enabled_clause
ORDER BY p.name";

$t_result = db_query_bound( $t_query, ( $p_show_disabled ? null : array( true ) ) );
$t_result = db_query_bound( $t_query, ( $p_show_disabled ? array() : array( true ) ) );

$g_cache_project_hierarchy = array();
$g_cache_project_inheritance = array();
Expand Down
2 changes: 1 addition & 1 deletion core/summary_api.php
Expand Up @@ -569,7 +569,7 @@ function summary_print_by_reporter() {
WHERE $t_specific_where
GROUP BY reporter_id
ORDER BY num DESC";
$t_result = db_query_bound( $t_query, null, $t_reporter_summary_limit );
$t_result = db_query_bound( $t_query, array(), $t_reporter_summary_limit );

$t_reporters = array();
while( $t_row = db_fetch_array( $t_result ) ) {
Expand Down
2 changes: 1 addition & 1 deletion core/user_api.php
Expand Up @@ -1074,7 +1074,7 @@ function user_get_accessible_subprojects( $p_user_id, $p_project_id, $p_show_dis
WHERE $t_enabled_clause
ph.parent_id IS NOT NULL
ORDER BY p.name";
$t_result = db_query_bound( $t_query, ( $p_show_disabled ? null : array( true ) ) );
$t_result = db_query_bound( $t_query, ( $p_show_disabled ? array() : array( true ) ) );
} else {
$t_query = "SELECT DISTINCT p.id, p.name, ph.parent_id
FROM $t_project_table p
Expand Down
2 changes: 1 addition & 1 deletion manage_user_page.php
Expand Up @@ -179,7 +179,7 @@
echo '</ul>';
echo '</div>';

$t_where_params = null;
$t_where_params = array();
if( $f_filter === 'ALL' ) {
$t_where = '(1 = 1)';
} else if( $f_filter === 'UNUSED' ) {
Expand Down

0 comments on commit c726ff7

Please sign in to comment.