Skip to content

Commit

Permalink
Merge pull request #19 from zoho/beta
Browse files Browse the repository at this point in the history
8.1.0
  • Loading branch information
raja-7453 authored Dec 31, 2024
2 parents c844e80 + 8c9dbba commit 1d5cefe
Show file tree
Hide file tree
Showing 1,590 changed files with 155,017 additions and 9 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ License

## Latest Version

- [8.1.0](/versions/8.1.0/README.md)
- FileStore class issue fixed.

- [8.0.0](/versions/8.0.0/README.md)
- Handled FileStore save and update token method issue.
- Update CADataCenter Accounts URL.
Expand Down Expand Up @@ -83,10 +86,10 @@ For older versions, please [refer](https://github.com/zoho/zohocrm-php-sdk-6.0/r

## Including the SDK in your project
You can include the SDK to your project using Composer.
For installing the latest [version](https://github.com/zoho/zohocrm-php-sdk-6.0/releases/tag/8.0.0) of PHP SDK, navigate to the workspace of your client app and run the following command.
For installing the latest [version](https://github.com/zoho/zohocrm-php-sdk-6.0/releases/tag/8.1.0) of PHP SDK, navigate to the workspace of your client app and run the following command.

```sh
composer require zohocrm/php-sdk-6.0:8.0.0
composer require zohocrm/php-sdk-6.0:8.1.0
```
With this, the PHP SDK will be installed and a package named vendor will be created in the workspace of your client app.

Expand All @@ -105,4 +108,4 @@ For example, if you generate the tokens for your Sandbox environment in the CN d
---

For more details, kindly refer here. [here](/versions/8.0.0/README.md).
For more details, kindly refer here. [here](/versions/8.1.0/README.md).
2 changes: 1 addition & 1 deletion src/com/zoho/api/authenticator/OAuthToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public function getToken()
}
$url = $initializer->getEnvironment()->getAccountsUrl();
$save = false;
if ($oauthToken->getAccessToken() == null && mb_strlen($oauthToken->getAccessToken() ?? '', 'utf-8') == 0)
if ($oauthToken->getAccessToken() == null || mb_strlen($oauthToken->getAccessToken() ?? '', 'utf-8') == 0)
{
if ($oauthToken->getRefreshToken() != null && mb_strlen($oauthToken->getRefreshToken() ?? '', 'utf-8') > 0)
{
Expand Down
11 changes: 7 additions & 4 deletions src/com/zoho/api/authenticator/store/FileStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,13 @@ public function getTokens()
for ($index = 1; $index < sizeof($allContents); $index++)
{
$nextRecord = str_getcsv($allContents[$index]);
$class = new \ReflectionClass(OAuthToken::class);
$token = $class->newInstanceWithoutConstructor();
$this->setMergeData($token, $nextRecord);
array_push($tokens, $token);
if(sizeof($nextRecord) > 1)
{
$class = new \ReflectionClass(OAuthToken::class);
$token = $class->newInstanceWithoutConstructor();
$this->setMergeData($token, $nextRecord);
array_push($tokens, $token);
}
}
}
catch (\Exception $ex)
Expand Down
2 changes: 1 addition & 1 deletion src/com/zoho/crm/api/util/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class Constants
const SET_API_URL_EXCEPTION = "Exception in setting API URL";
const AUTHENTICATION_EXCEPTION = "Exception in authenticating current request : ";
const FORM_REQUEST_EXCEPTION = "Exception in forming request body : ";
const SDK_VERSION = "8.0.0";
const SDK_VERSION = "8.1.0";
const API_CALL_EXCEPTION = "Exception in current API call execution : ";
const HTTP = "http";
const CONTENT_API_URL = "content.zohoapis.com";
Expand Down
Loading

0 comments on commit 1d5cefe

Please sign in to comment.