Skip to content

Commit

Permalink
Fix #15451: Incorrect invocations of SoapObjectsFactory::newSoapFault
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Munteanu <robert@lmn.ro>
  • Loading branch information
cybd authored and rombert committed Jan 31, 2013
1 parent f977b3c commit 1f65ba4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions api/soap/mc_project_api.php
Expand Up @@ -182,7 +182,7 @@ function mc_project_rename_category_by_name( $p_username, $p_password, $p_projec
$t_user_id = mci_check_login( $p_username, $p_password );

if ( null === $p_assigned_to ) {
return SoapObjectsFactory::newSoapFault( 'Client', '', 'p_assigned_to needed' );
return SoapObjectsFactory::newSoapFault( 'Client', 'p_assigned_to needed' );
}

if( $t_user_id === false ) {
Expand Down Expand Up @@ -220,7 +220,7 @@ function mc_project_get_versions( $p_username, $p_password, $p_project_id ) {
}

if( !project_exists( $p_project_id ) ) {
return SoapObjectsFactory::newSoapFault( 'Client', '', "Project '$p_project_id' does not exist." );
return SoapObjectsFactory::newSoapFault( 'Client', "Project '$p_project_id' does not exist." );
}

if( !mci_has_readonly_access( $t_user_id, $p_project_id ) ) {
Expand Down Expand Up @@ -553,7 +553,7 @@ function mc_project_get_attachments( $p_username, $p_password, $p_project_id ) {
}

if( !project_exists( $p_project_id ) ) {
return SoapObjectsFactory::newSoapFault( 'Client', '', "Project '$p_project_id' does not exist." );
return SoapObjectsFactory::newSoapFault( 'Client', "Project '$p_project_id' does not exist." );
}

if( !mci_has_readonly_access( $t_user_id, $p_project_id ) ) {
Expand Down Expand Up @@ -699,7 +699,7 @@ function mc_project_add( $p_username, $p_password, $p_project ) {


if ( !isset( $p_project['name'] ) ) {
return SoapObjectsFactory::newSoapFault( 'Client', '', 'Required field "name" is missing' );
return SoapObjectsFactory::newSoapFault( 'Client', 'Required field "name" is missing' );
} else {
$t_name = $p_project['name'];
}
Expand Down
2 changes: 1 addition & 1 deletion api/soap/mc_project_attachment_api.php
Expand Up @@ -56,7 +56,7 @@ function mc_project_attachment_add( $p_username, $p_password, $p_project_id, $p_
return mci_soap_fault_access_denied( $t_user_id );
}
if( is_blank( $p_title ) ) {
return SoapObjectsFactory::newSoapFault( 'Client', '', 'Title must not be empty.' );
return SoapObjectsFactory::newSoapFault( 'Client', 'Title must not be empty.' );
}
return mci_file_add( $p_project_id, $p_name, $p_content, $p_file_type, 'project', $p_title, $p_description, $t_user_id );
}
Expand Down

0 comments on commit 1f65ba4

Please sign in to comment.