sdk-php icon indicating copy to clipboard operation
sdk-php copied to clipboard

Invisible \u00A0 character before is_object() call

Open chriswayoub opened this issue 4 years ago • 5 comments

There are non-breaking space UTF-8 characters in the source code that cause fatal errors. It looks like this is the case everywhere that the code calls is_object when checking the $data array. I've referenced one example below, but they all have the same issue.

https://github.com/AuthorizeNet/sdk-php/blob/cba58272dcae529b710cb33039ff5d05b88af2ca/lib/net/authorize/api/contract/v1/CreateCustomerProfileResponse.php#L225

The fatal error that is thrown is:

Call to undefined function net\authorize\api\contract\v1\ is_object()

This looks like an issue with the code generation script: https://github.com/AuthorizeNet/sdk-php/blob/cba58272dcae529b710cb33039ff5d05b88af2ca/scripts/appendSetCode.txt#L4

According to the contribution guide, I can't submit a pull request for those files.

chriswayoub avatar Oct 22 '19 17:10 chriswayoub

Same issue, any solutions, other than temporarily updating the vendor code?

jimfurnier avatar Nov 20 '19 12:11 jimfurnier

Same issue,

In GetTransactionDetailsResponse.php line 96:

Call to undefined function net\authorize\api\contract\v1\Â is_object()

zohaibhassan156 avatar Feb 13 '20 08:02 zohaibhassan156

I am seeing the same hidden character issue here. AuthNet, any updates on this? We are looking at upgrading our AIM implementation to make use of this library through Composer, but this obviously won't fly for production.

https://github.com/AuthorizeNet/sdk-php/blob/cba58272dcae529b710cb33039ff5d05b88af2ca/lib/net/authorize/api/contract/v1/CreateTransactionResponse.php#L72

jmcguire81 avatar Mar 31 '20 19:03 jmcguire81

Is there any news on this?? I get this from the sample code

packytagliaferro avatar Jul 13 '20 14:07 packytagliaferro

@gnongsie It looks like this issue (and #390) were addressed in your commit 4daeec2ab108d37ba3b6847c334f77e62f9fdc31. Additionally, it looks like this commit was part of the 2.0.2 release.

Is my understanding correct? If so, it looks like these two issues have been fixed and can be closed.

schmich avatar May 24 '21 22:05 schmich