From 1e70c3cbc1c7d57733568ed6058da893266fda74 Mon Sep 17 00:00:00 2001 From: jeckyll Date: Fri, 11 Jan 2013 10:56:42 +0100 Subject: [PATCH] fix #15356 [SOAP Api] Check errors raised by mci_issue_set_custom_field --- api/soap/mc_issue_api.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/soap/mc_issue_api.php b/api/soap/mc_issue_api.php index 64ffa21db7..a38fe08c8e 100644 --- a/api/soap/mc_issue_api.php +++ b/api/soap/mc_issue_api.php @@ -676,7 +676,9 @@ function mc_issue_add( $p_username, $p_password, $p_issue ) { # submit the issue $t_issue_id = $t_bug_data->create(); - mci_issue_set_custom_fields( $t_issue_id, $p_issue['custom_fields'], false ); + $t_set_custom_field_error = mci_issue_set_custom_fields( $t_issue_id, $p_issue['custom_fields'], false ); + if ( $t_set_custom_field_error != null ) return $t_set_custom_field_error; + if ( isset ( $p_issue['monitors'] ) ) mci_issue_set_monitors( $t_issue_id , $t_user_id, $p_issue['monitors'] ); @@ -859,7 +861,9 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) { $t_bug_data->target_version = isset( $p_issue['target_version'] ) ? $p_issue['target_version'] : ''; } - mci_issue_set_custom_fields( $p_issue_id, $p_issue['custom_fields'], true ); + $t_set_custom_field_error = mci_issue_set_custom_fields( $p_issue_id, $p_issue['custom_fields'], true ); + if ( $t_set_custom_field_error != null ) return $t_set_custom_field_error; + if ( isset ( $p_issue['monitors'] ) ) mci_issue_set_monitors( $p_issue_id , $t_user_id, $p_issue['monitors'] );