Update Appointments.php

Bug fix: Appointments Parser crashes when a provider break is added to the schedule
This commit is contained in:
Caine85 2018-04-09 12:06:48 +02:00 committed by GitHub
parent 43b9cf678b
commit 8c16a52d2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -39,21 +39,21 @@ class Appointments implements ParsersInterface {
'googleCalendarId' => $response['id_google_calendar'] !== NULL ? (int)$response['id_google_calendar'] : NULL
];
if (array_key_exists('provider', $response))
if (isset($response['provider']))
{
$providerParser = new Providers();
$providerParser->encode($response['provider']);
$encodedResponse['provider'] = $response['provider'];
}
if (array_key_exists('customer', $response))
if (isset($response['customer']))
{
$customerParser = new Customers();
$customerParser->encode($response['customer']);
$encodedResponse['customer'] = $response['customer'];
}
if (array_key_exists('service', $response))
if (isset($response['service']))
{
$serviceParser = new Services();
$serviceParser->encode($response['service']);