Open
Description
Environment details
- OS: Linux
- PHP version: 8.2
- Package name and version: google/apiclient v2.18.2
Steps to reproduce
- Create a Google Calendar service instance
- Attempt to get an event using events->get() method
- Try to access the Hangout link using getHangoutLink()
- Observe that getHangoutLink() returns a null character instead of an empty string
Code example
$service = $this->createGoogleService();
$event = $service->events->get($calendarId, $eventId);
// Debug output showing the issue
echo 'shouldGenMeetingUrsssl: ' . ($event->getHangoutLink() !== "") . "\n"; // false
echo 'shouldGenMeetingUrl: ' . $event->getHangoutLink() . "\n"; //
echo 'isNULL: ' . ($event->getHangoutLink() === null) . "\n"; // true
echo 'isEmptyString: ' . ($event->getHangoutLink() === "") . "\n"; //false
Expected behavior
The getHangoutLink() method should return an empty string ("") when no Hangout link is present, according to the API documentation.
Actual behavior
The getHangoutLink() method returns a null character (\0), not an empty string ("") or PHP null value. This causes unexpected behavior with string comparisons and can lead to subtle bugs in string handling code.
Metadata
Metadata
Assignees
Labels
No labels