Problem/Motivation

the parameter $message for tmgmt_message_access() is optional, but it's used as if it would be required, what leads under certain circumstances to a fatal php error:
Call to a member function getJob() on a non-object in modules/tmgmt/tmgmt.module on line 596

Proposed resolution

Create a variable $job and fill it conditionally, if the parameter $message is available, to pass it to tmgmt_job_access().
Should work fine as $job is optional in tmgmt_job_access().

Remaining tasks

reviews needed

User interface changes

none

API changes

none

CommentFileSizeAuthor
tmgmt-fix-in-tmgmt_message_access.patch691 bytesdas-peter

Comments

berdir’s picture

Status: Needs review » Fixed

Wasn't aware that view can be called without an entity sometimes too. Thanks, commited.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.