Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Incorrect project-specific where clause

If user has access to only one project (or if there is only one project
in bug tracker), helper_project_specific_where() function returned an
incorrect where clause when $project_id == ALL_PROJECTS.

Fixes #17073
  • Loading branch information...
commit 85e471e9472943cf41d666e38001e2cf5e1a8c46 1 parent 2588e1d
@dregad dregad authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  core/helper_api.php
View
2  core/helper_api.php
@@ -385,7 +385,7 @@ function helper_project_specific_where( $p_project_id, $p_user_id = null ) {
if( 0 == count( $t_project_ids ) ) {
$t_project_filter = ' 1<>1';
} else if( 1 == count( $t_project_ids ) ) {
- $t_project_filter = ' project_id=' . $t_project_ids[0];
+ $t_project_filter = ' project_id=' . reset( $t_project_ids );
} else {
$t_project_filter = ' project_id IN (' . join( ',', $t_project_ids ) . ')';
}
Please sign in to comment.
Something went wrong with that request. Please try again.