Skip to content

Commit

Permalink
Make sure given custom field data is an array
Browse files Browse the repository at this point in the history
Fixes #26540
  • Loading branch information
dregad committed Feb 17, 2020
1 parent 73fc958 commit 9f1925f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/soap/mc_project_api.php
Expand Up @@ -647,6 +647,12 @@ function mci_project_custom_fields_validate( $p_project_id, &$p_custom_fields )

$t_custom_field_values = array();
if( isset( $p_custom_fields ) ) {
if( !is_array( $p_custom_fields ) ) {
throw new ClientException(
"Invalid Custom Field '$p_custom_fields'",
ERROR_CUSTOM_FIELD_NOT_FOUND
);
}
foreach( $p_custom_fields as $t_custom_field ) {
$t_custom_field = ApiObjectFactory::objectToArray( $t_custom_field );

Expand Down

0 comments on commit 9f1925f

Please sign in to comment.