Skip to content
Browse files

Fix invocation of db_param() with incorrect number of arguments

Conflicts:
	core/version_api.php
	library/adodb
	library/phpmailer
  • Loading branch information...
1 parent 6dd8ad3 commit 19c0ab51c5d107baf8d5646948e82dbf9cc7b4ac @rlerdorf rlerdorf committed with rombert May 12, 2013
Showing with 4 additions and 7 deletions.
  1. +4 −7 core/version_api.php
View
11 core/version_api.php
@@ -478,8 +478,6 @@ function version_get_all_rows( $p_project_id, $p_released = null, $p_obsolete =
$t_project_version_table = db_get_table( 'project_version' );
- $t_param_count = 0;
-
$t_project_where = version_get_project_where_clause( $p_project_id, $p_inherit );
$query = "SELECT *
@@ -490,13 +488,13 @@ function version_get_all_rows( $p_project_id, $p_released = null, $p_obsolete =
if( $p_released !== null ) {
$c_released = db_prepare_int( $p_released );
- $query .= " AND released = " . db_param( $t_param_count++ );
+ $query .= " AND released = " . db_param();
$query_params[] = $c_released;
}
if( $p_obsolete !== null ) {
$c_obsolete = db_prepare_bool( $p_obsolete );
- $query .= " AND obsolete = " . db_param( $t_param_count++ );
+ $query .= " AND obsolete = " . db_param();
$query_params[] = $c_obsolete;
}
@@ -522,21 +520,20 @@ function version_get_all_rows( $p_project_id, $p_released = null, $p_obsolete =
function version_get_all_rows_with_subs( $p_project_id, $p_released = null, $p_obsolete = false ) {
$t_project_where = helper_project_specific_where( $p_project_id );
- $t_param_count = 0;
$t_query_params = array();
if( $p_released === null ) {
$t_released_where = '';
} else {
$c_released = (int)$p_released;
- $t_released_where = "AND ( released = " . db_param( $t_param_count++ ) . " )";
+ $t_released_where = "AND ( released = " . db_param() . " )";
$t_query_params[] = $c_released;
}
if( $p_obsolete === null ) {
$t_obsolete_where = '';
} else {
- $t_obsolete_where = "AND ( obsolete = " . db_param( $t_param_count++ ) . " )";
+ $t_obsolete_where = "AND ( obsolete = " . db_param() . " )";
$t_query_params[] = $p_obsolete;
}

0 comments on commit 19c0ab5

Please sign in to comment.
Something went wrong with that request. Please try again.