Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master-2.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
vboctor committed Jan 28, 2018
2 parents 09306f2 + 9d7be13 commit 5a9c378
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/soap/mc_project_api.php
Expand Up @@ -672,6 +672,8 @@ function mci_project_custom_fields_validate( $p_project_id, &$p_custom_fields )
$t_custom_field_values = array();
if( isset( $p_custom_fields ) ) {
foreach( $p_custom_fields as $t_custom_field ) {
$t_custom_field = ApiObjectFactory::objectToArray( $t_custom_field );

if( !isset( $t_custom_field['value'] ) ) {
$t_error = 'Custom field has no value specified.';
return ApiObjectFactory::faultBadRequest( $t_error );
Expand All @@ -682,6 +684,8 @@ function mci_project_custom_fields_validate( $p_project_id, &$p_custom_fields )
return ApiObjectFactory::faultBadRequest( $t_error );
}

$t_custom_field['field'] = ApiObjectFactory::objectToArray( $t_custom_field['field'] );

if( isset( $t_custom_field['field']['id'] ) ) {
$t_def = $t_custom_field_defs[(int)$t_custom_field['field']['id']];
$t_custom_field_values[$t_def['name']] = $t_custom_field['value'];
Expand Down

0 comments on commit 5a9c378

Please sign in to comment.