Exception thrown when session doesn't exist

Created on 19 August 2024, about 1 year ago

Problem/Motivation

After upgrading to autologout 1.5, drush commands that execute as a particular user throw an exception. This problem is also present on version 2.0.

Steps to reproduce

Install CiviCRM:

composer config extra.enable-patching true
composer require civicrm/civicrm-{core,packages,drupal-8}
composer require civicrm/cli-tools

Use the `drush cvapi` command, i.e. `drush cvapi System.getactions`.

Proposed resolution

This occurs due to the change to `autologout_check_session_variable` in commit ae12b9b1d40343b7f85fbefc71b2f32e43cbce8e

Wrapping the call to `getSession()` in an `if` that checks if the session exists resolves this.

Remaining tasks

None (after patch review).

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States MegaphoneJon

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024