Skip to content

empty XML field causes PHP Catchable fatal error #37

@justindossey

Description

@justindossey

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions