Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix when path contains 'src' #30

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tom-knight
Copy link

If you run the php-sdk from a path that includes the string "src" it will throw an SDKException as it cannot find the JSON details file.

E.g if my code is running from /home/user/src/project/ (with /home/user/src/project/vendor/zohocrm/php-sdk/) I get the following error when I try to call Initializer::initialize:

com\zoho\crm\api\exception\SDKException Caused by : ERROR IN READING JSONDETAILS FILE : - file_get_contents(/home/user/src/resources/JSONDetails.json): Failed to open stream: No such file or directory

It should be using the file /home/user/src/project/vendor/zohocrm/php-sdk/src/resources/JSONDetails.json.

This PR fixes this issue and works for both paths containing and not containing "src".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant