Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

empty XML field causes PHP Catchable fatal error

Open
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
php
Domain
api, payments

Research direction

Start at lib/CybsSoapClient.php line 89 and reproduce the request using the empty street2 field shown in the issue. Trace how the XML field is converted there; done means the request succeeds with an empty field without the Catchable fatal error.

Written by the indexing model from the issue text.

Description

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>[email protected]</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.

Dominant language
PHP
Stars
60
Forks
59
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CyberSource/cybersource-sdk-php

All issues in CyberSource/cybersource-sdk-php

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.