Topic: Unable to enter Event data on calendar

I am unable to enter data in a calendar date. when i click on any date, the following message is displayed in a pop-up window: "Notice: Trying to access array offset on value of type bool in /home/caregive/public_html/luxcal/pages/event.php on line 213". It is printed out 18 times.

Re: Unable to enter Event data on calendar

Hi Dave,

This problem only happens when running a PHP version > 7.3 on your server.
I've sent you a new event.php file with the solution.

For other calendar users:
This problem can be fixed by editing the pages/event.php file and changing line 182 from . . .

$cid = isset($_POST['cid']) ? $_POST['cid'] : ($eCats[0] == '0' ? 0 : intval($eCats[0]));

to . . .

$cid = isset($_POST['cid']) ? $_POST['cid'] : ($eCats[0] == '0' ? 1 : intval($eCats[0]));

(only the 0 before ": intval" changed to 1)

Roel

Re: Unable to enter Event data on calendar

Hi Roel,

I made the change that you posted and it resolved the issue. Thanks so much for the help!

Regards,
Dave