Synonym::isActive() returns always TRUE

Created on 2 September 2022, over 2 years ago
Updated 17 April 2025, 11 days ago

Problem/Motivation

The method isActive() of the entity Synonym seems to always return TRUE, even if the synonym was not active.

This is due to the fact that the result of $this->get('status')->value is a string, and "1" as well as "0" both evaluate to TRUE.

Steps to reproduce

Have an inactive synonym, load it programmatically and check the return value of the method isActive().

Proposed resolution

Maybe convert the value into an integer first.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024