tschoffelen / php-pkpass

💳 PHP class for creating passes for Wallet on iOS.
https://includable.com
MIT License
913 stars 188 forks source link

Minor fixes to image filepath and namespace #32

Closed ebetancourt closed 11 years ago

ebetancourt commented 11 years ago

I was getting some errors that the class "PKPass" didn't exist, and that icon.png was not set when it was.

I fixed the class error by changing the instantiation of the class in example.php as new PKPass\PKPass();

Also, when the code is setting the filename as the index in the files array, it is defaulting to using the full path to the file as the filename when it's not set instead of using the basename. these commits fix that as well.

tschoffelen commented 11 years ago

The basenaming was removed in a previous pull request because that made some things not work correctly, but I agree that it should be in there. Thanks for the effort!

wouterds commented 11 years ago

This is still an existing bug. I fixed it as well by changing the initialisation of the class like @ebetancourt did.

This is what I did to fix it: Change new PKPass() to new \PKPass\PKPass()