Uncaught PHP Exception Error: "Call to a member function access() on null"

Created on 4 January 2024, 6 months ago
Updated 30 January 2024, 5 months ago

Problem/Motivation

We have encountered a WSOD page when visiting a regular members profile as a SM. The error was

Uncaught PHP Exception Error: "Call to a member function access() on null" at /app/html/profiles/contrib/social/modules/custom/activity_creator/src/ActivityAccessControlHandler.php line 116

Steps to reproduce

I don't have an exact steps to reproduce, but the issue should occur if a certain reference activity is deleted and thus the access check throws an errror.

Proposed resolution

Currently activity_creator/src/ActivityAccessControlHandler.php we not gracefully handling if the related entity does not exist. We always assume that it is there, so we should add a check that verifies that the related entity indeed exists before calling a method.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

12.0

Component

Code (back-end)

Created by

🇸🇮Slovenia nkoporec Slovenia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024