Skip to content

Commit

Permalink
Fix PHP error when retrieving inaccessible fields
Browse files Browse the repository at this point in the history
An example is when a reporter attempts to retrieve a private issue.
There can be other errors that would trigger the same.

Fixes #23620
  • Loading branch information
vboctor committed Nov 10, 2017
1 parent 81e936a commit 0c99406
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/rest/restcore/issues_rest.php
Expand Up @@ -63,7 +63,7 @@ function rest_issue_get( \Slim\Http\Request $p_request, \Slim\Http\Response $p_r
$t_issue = mc_issue_get( /* username */ '', /* password */ '', $t_issue_id );

if( ApiObjectFactory::isFault( $t_issue ) ) {
return $p_response->withStatus( $t_result->status_code, $t_result->fault_string );
return $p_response->withStatus( $t_issue->status_code, $t_issue->fault_string );
}

$t_result = array( 'issues' => array( $t_issue ) );
Expand Down

0 comments on commit 0c99406

Please sign in to comment.