Skip to content

Commit

Permalink
Issue #19344: NuSoap compatibility
Browse files Browse the repository at this point in the history
NuSoap uses arrays, so using the -> operator will trigger a SYSTEM
NOTICE, Error Description: Trying to get property of non-object.

To avoid that, we typecast the array to object.
  • Loading branch information
dregad committed Feb 4, 2015
1 parent 3dcac09 commit a448094
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/soap/mc_issue_api.php
Expand Up @@ -657,6 +657,8 @@ function mc_issue_add( $p_username, $p_password, $p_issue ) {

if(( $t_project_id == 0 ) || !project_exists( $t_project_id ) ) {
if( $t_project_id == 0 ) {
# compatibility with NuSoap (which uses arrays)
$t_project = (object)$t_project;
return SoapObjectsFactory::newSoapFault('Client', "Project '" . $t_project->name . "' does not exist.");
} else {
return SoapObjectsFactory::newSoapFault('Client', "Project with id '" . $t_project_id . "' does not exist.");
Expand Down

0 comments on commit a448094

Please sign in to comment.