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

empty XML field causes PHP Catchable fatal error #37

Open
justindossey opened this issue Mar 27, 2020 · 0 comments
Open

empty XML field causes PHP Catchable fatal error #37

justindossey opened this issue Mar 27, 2020 · 0 comments

Comments

@justindossey
Copy link

Observed behavior:
with a billTo block in an XML request like this:

  <billTo>
    <firstName>Friday</firstName>
    <lastName>Test</lastName>
    <street1>123 Test St</street1>
    <street2></street2>
    <city>My City</city>
    <state>CA</state>
    <postalCode>12345</postalCode>
    <country>US</country>
    <email>nobody@cybersource.com</email>
    <customerID>56</customerID>
  </billTo>

I get
PHP Catchable fatal error: Object of class stdClass could not be converted to string in lib/CybsSoapClient.php on line 89
This is because the street2 field has no data. Removing that field causes the request to succeed.

Expected behavior:
the request will succeed even with an empty field.

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