empty XML field causes PHP Catchable fatal error
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CyberSource/cybersource-sdk-php
-
Difficulty 1/5 Under an hour Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
CyberSource/cybersource-sdk-php#42 · 2 comments ·
-
RefundsOpen
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in CyberSource/cybersource-sdk-php
Similar issues
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
P2 testing
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
1.severity: security
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Automattic/static-site-importer#1879 ·
Maintainers usually reply within 1 day
-
bug Installation / Upgrade
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day