Skip to content
Permalink
Browse files

Fix create a bug with custom fields via SOAP

Fixes #23746
  • Loading branch information...
vboctor committed Jan 13, 2018
1 parent 9717433 commit 9d7be13a328af2050ce3369ab6f4ca33e0b8b9c8
Showing with 4 additions and 0 deletions.
  1. +4 −0 api/soap/mc_project_api.php
@@ -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 );
@@ -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'];

0 comments on commit 9d7be13

Please sign in to comment.
You can’t perform that action at this time.