AuthorizeNet / sdk-php

PHP SDK for Authorize.Net API
Other
427 stars 403 forks source link

Invisible \u00A0 character before is_object() call #380

Open chriswayoub opened 4 years ago

chriswayoub commented 4 years ago

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.

jimfurnier commented 4 years ago

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

zohaibhassan156 commented 4 years ago

Same issue,

In GetTransactionDetailsResponse.php line 96:

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

jmcguire81 commented 4 years ago

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

packytagliaferro commented 4 years ago

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

schmich commented 3 years ago

@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.