Problem/Motivation

Trying to use this module in PHP 8.0 we get the error

Error: Attempt to assign property "expiration_time" on null in VoipSession->resetTimer() (line 136 of /srv/newmode/drupal/profiles/newmode/modules/contrib/voipdrupal/modules/voipcall/voipsession.inc)

This happens after a call is made and twilio attempts to visit the callback url.

Steps to reproduce

We have a fairly complicated set up that I can't really describe here, but basically we use webform to trigger a call. The call happens, I answer my phone and get allison telling me an application error occurred. The twilio logs show a 500 response from our callback url. The Drupal logs show the above error.

Proposed resolution

I'm not sure if this is the best fix, but changing the constructor to do

$this->session_data = $session_data ?? new \stdClass();

Seems to fix things.

CommentFileSizeAuthor
#2 php8-3322240-2.patch418 byteslambic

Comments

lambic created an issue. See original summary.

lambic’s picture

StatusFileSize
new418 bytes