TypeError: Return value must be of type bool, int returned

Created on 25 August 2025, 7 days ago

Problem/Motivation

This might just be my setup but I noticed that my configuration started exporting as 1 and 0 from the SchemaForm. I noticed this error because it started causing the Explorer to crash and showed this error in the logs.

TypeError: Drupal\graphql_compose_menus\Wrapper\MenuLinkContentWrapper::isEnabled(): Return value must be of type bool, int returned in Drupal\graphql_compose_menus\Wrapper\MenuLinkContentWrapper->isEnabled() (line 22

Looking into this it seems like those values should always be true|false boolean values. When I make that change the error goes away and my Explorer/Voyager work again.

Steps to reproduce

  • Enable/Disable a setting on the Schema Form (/admin/config/graphql_compose)
  • Save form
  • Export Config
  • Navigate to Explorer or Voyager

Proposed resolution

The current code already adjusts those values during the sortAndFilterSettings() method. Add a check for ['0','1'] values and convert to bool.

Remaining tasks

Create fork and add fix.

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

2.4

Component

Code

Created by

🇨🇴Colombia jlockhart Nomadic: Colombia

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