Skip to content
Browse files

Fix #15451: Incorrect invocations of SoapObjectsFactory::newSoapFault

Signed-off-by: Robert Munteanu <robert@lmn.ro>
  • Loading branch information...
1 parent 4ea08bf commit 37631b83ba6b0810bb9b1beea73e4cc2f5ff4e03 @cybd cybd committed with rombert
Showing with 5 additions and 5 deletions.
  1. +4 −4 api/soap/mc_project_api.php
  2. +1 −1 api/soap/mc_project_attachment_api.php
View
8 api/soap/mc_project_api.php
@@ -183,7 +183,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 ) {
@@ -221,7 +221,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 ) ) {
@@ -554,7 +554,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 ) ) {
@@ -700,7 +700,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'];
}
View
2 api/soap/mc_project_attachment_api.php
@@ -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 );
}

0 comments on commit 37631b8

Please sign in to comment.
Something went wrong with that request. Please try again.