I'm got to the github - and see this
<?php
$client->api('issue')->create(array(
'project_id' => 'test',
'subject' => 'some subject',
'description' => 'a long description blablabla',
'assigned_to' => 'user1',
));
?>
you make this
<?php
if($client->api('issue')->create === true) { //create is no property, is a function
?>
change your code to
<?php
$ret = $client->api('issue')->create(array(
'project_id' => '13',
'subject' => 'test api (xml) 2',
'description' => 'test api',
'tracker_id' => '3',
));
if( $ret ) {
//....
}
else{
//....
}
?>
I've got the source and extract the code to add an issue, shown at: http://pastebin.com/dXB1c88S
change the if-statement to
<?php
if( $ret instanceof SimpleXMLElement ){
//look in the Object
var_dump($ret);
//UPDATE: after see your response object
if( isset( $ret->error ) ){
//any error occurred
//$ret->error takes an message
}
else{
//there is no error: issue successful created
}
}
else{
if( $ret === true ){
//i do not see... issue is successful created?
//there is no response?!
}
else{
//return is a string
//i do not see... issue is successful created?
//check the string
}
}
?>