Page MenuHomePhorge

Fix NULL pointer exception in some circumstances from Calendar's homepage

Authored by valerio.bozzolan on Nov 28 2022, 15:02.
Referenced Files
F249467: D25060.id297.diff
Fri, Jan 27, 21:59
F249466: D25060.id296.diff
Fri, Jan 27, 21:59
F249465: D25060.id295.diff
Fri, Jan 27, 21:58
F249464: D25060.id290.diff
Fri, Jan 27, 21:58
Fri, Jan 27, 21:58
F249368: D25060.id295.diff
Fri, Jan 27, 19:47
Unknown Object (File)
Wed, Jan 25, 05:50
Unknown Object (File)
Sat, Jan 21, 17:34



After importing specific weird events, for example from Google Calendar (bleah), it can happen that the Calendar's homepage becomes broken.

This was the Exception error shown to video:

"Call to a member function getEventsBetween() on null"

It was happening since this method can return NULL:


This changeset verifies this condition from the Calendar's homepage.

Closes T15136

Test Plan

I tried in my server. I've executed the syntax lint. On my local machine I was not able to run "arc diff" since it tries to connect to root@localhost for some reasons.

Diff Detail

rP Phorge
Lint Not Applicable
Tests Not Applicable

Event Timeline


Basically I've just indented the $recurrences = $set->getEventsBetween() under an if($set).

valerio.bozzolan retitled this revision from Fix NULL pointer exception from Calendar's homepage to Fix NULL pointer exception in some circumstances from Calendar's homepage.Nov 28 2022, 20:25
valerio.bozzolan edited the summary of this revision. (Show Details)
valerio.bozzolan added a project: Calendar.

This looks good to me. It seems like I may have actually ran into this before and just didn't manage to upstream the fix from Wikimedia's fork.

This revision is now accepted and ready to land.Nov 30 2022, 18:13
$ arc land

Exception: You do not have permission to push to this repository.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I also tried executing yes | arc land but nothing.

I also tried the GNU version of yes that huge efficiency - but nothing.

I also tried to re-implement yes using a low-level approach, but nothing:


As workaround it seems I need to become a Blessed Committers until I find a definitive solution to land.

0 added inline comments.

The rest of the codebase uses array() instead of [], but that might just be for compatibility with old PHP.

add support for PHP versions that should be nuked

Hi @Matthew I think I cannot run arc land since I'm not in Blessed Committers

Hi @Matthew I think I cannot run arc land since I'm not in Blessed Committers

That is correct, I am working on getting this landed. Please stop pinging me, it will land soon.