When using the partial response feature via the "fields" optional parameter and
the requested event range does not contain any events the google-api-php-client
throws an invalid json exception.
What steps will reproduce the problem?
Below is an example (just search a time period with no events):
$service = new apiCalendarService($client);
$params['timeMin'] = date(DATE_RFC3339, $start);
$params['timeMax'] = date(DATE_RFC3339, $end);
$params['timeZone'] = 'America/New_York';
$params['orderBy'] = 'startTime';
$params['singleEvents'] = TRUE;
$params['fields'] = 'items(id,sequence,start,summary)';
$events = $service->events->listEvents('primary', $params);
What is the expected output? What do you see instead?
Expected:
An empty Events object
Actual Result (truncated stack trace):
PHP Fatal error: Uncaught exception 'apiServiceException' with message
'Invalid json in service response: {}\n' in
google-api-php-client-0.5.0/src/io/apiREST.php:93\nStack trace:\n#0
google-api-php-client-0.5.0/src/io/apiREST.php(56):
apiREST::decodeHttpResponse(Object(apiHttpRequest))
What version of the product are you using? On what operating system?
v0.5.0 on RHEL 5.8 using system packaged PHP v5.3.3
Please provide any additional information below.
There is only a problem when no events are found.
Original issue reported on code.google.com by herri...@denison.edu on 16 May 2012 at 5:57
Original issue reported on code.google.com by
herri...@denison.edu
on 16 May 2012 at 5:57