Open Braunson opened 3 years ago
I'm getting this error + stack when trying to run the code below. I can confirm the returned result is an array with "data" but has no "status" or "details" column.
Code:
$ZohoClient = new ZohoClient(); $ZohoClient->setAuthRefreshToken($_ENV['ZOHO_AUTH_REFRESH_TOKEN']); $ZohoClient->setZohoClientId($_ENV['ZOHO_CLIENT_ID']); $ZohoClient->setZohoClientSecret($_ENV['ZOHO_CLIENT_SECRET']); $refresh = $ZohoClient->generateAccessTokenByRefreshToken(); $ZohoClient->setModule('Contacts'); $response = $ZohoClient->getRecordById($id); dd($response);
Stack:
Warning: Undefined array key "status" in /var/www/vendor/mctekk/zohocrm/src/Zoho/CRM/Request/Response.php on line 220 Warning: Undefined array key "details" in /var/www/vendor/mctekk/zohocrm/src/Zoho/CRM/Request/Response.php on line 221 Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /var/www/vendor/mctekk/zohocrm/src/Zoho/CRM/Request/Response.php:221 Stack trace: #0 /var/www/vendor/mctekk/zohocrm/src/Zoho/CRM/Request/Response.php(221): array_key_exists('id', NULL) #1 /var/www/vendor/mctekk/zohocrm/src/Zoho/CRM/Request/Response.php(135): Zoho\CRM\Request\Response->parseResponsePostRecords() #2 /var/www/vendor/mctekk/zohocrm/src/Zoho/CRM/Request/Response.php(94): Zoho\CRM\Request\Response->parseResponse() #3 /var/www/vendor/mctekk/zohocrm/src/Zoho/CRM/Request/Factory.php(27): Zoho\CRM\Request\Response->__construct(Array, 'Contacts', 'get') #4 /var/www/vendor/mctekk/zohocrm/src/Zoho/CRM/ZohoClient.php(723): Zoho\CRM\Request\Factory->createResponse(Array, 'Contacts', 'get') #5 /var/www/vendor/mctekk/zohocrm/src/Zoho/CRM/ZohoClient.php(476): Zoho\CRM\ZohoClient->call('get', Array) #6 /var/www/app/Controllers/PageController.php(106): Zoho\CRM\ZohoClient->getRecordById('481776400000031...') #7 /var/www/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Route/Route.php(124): App\Controllers\PageController->showHome('481776400000031...') #8 /var/www/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Router.php(397): Pecee\SimpleRouter\Route\Route->renderRoute(Object(Pecee\Http\Request), Object(Pecee\SimpleRouter\Router)) #9 /var/www/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Router.php(331): Pecee\SimpleRouter\Router->routeRequest() #10 /var/www/vendor/pecee/simple-router/src/Pecee/SimpleRouter/SimpleRouter.php(63): Pecee\SimpleRouter\Router->start() #11 /var/www/public/index.php(11): Pecee\SimpleRouter\SimpleRouter::start() #12 {main} thrown in /var/www/vendor/mctekk/zohocrm/src/Zoho/CRM/Request/Response.php on line 221
I'm getting this error + stack when trying to run the code below. I can confirm the returned result is an array with "data" but has no "status" or "details" column.
Code:
Stack: