Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many methods do not return the correct value #27

Open
blefort-uo opened this issue May 4, 2017 · 0 comments
Open

Many methods do not return the correct value #27

blefort-uo opened this issue May 4, 2017 · 0 comments

Comments

@blefort-uo
Copy link

blefort-uo commented May 4, 2017

In many methods, there is this code used to validate the request:

$xml = simplexml_load_string($response);
write_log($xml->result);
return ($xml->result == 'true'); 

However, I found that the response is different in many situations (I only tested few of them), the response is:

Object(SimpleXMLElement)#225 (2) {
  ["@attributes"]=>
  array(1) {
    ["stat"]=>
    string(2) "ok"
  }
  ["success"]=>
  object(SimpleXMLElement)#221 (0) {
  }
}

so $xml->result == 'true' will never be true.

@blefort-uo blefort-uo changed the title Many method do not return the correct value Many methods do not return the correct value May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant