Skip to content

PHP 8.5 Deprecated function: Non-canonical cast (boolean) #162

Closed

Description

@izmeez

On a system with multiple contrib modules when using php 8.5.5 the following is seen:

Deprecated function: Non-canonical cast (boolean) is deprecated, use the (bool) cast instead in include_once() (line 1600 of core/includes/bootstrap.inc).

This appears to be related to og_ui/og_ui.module

  $role = og_role_load($rid);
  return (boolean) $role;

Changing it to return (bool) $role; fixes the issue.
I'll provide a PR, shortly.

Activity

  1. added theissue type on Apr 15, 2026
  2. self-assigned this
    on Apr 15, 2026
  3. added a commit that references this issue on Apr 15, 2026
  4. argiepiano commented on Apr 15, 2026

    @argiepiano
    Collaborator

    PR provided. #163

    Can you please confirm that the PR fixes the problem?

  5. izmeez commented on Apr 15, 2026

    @izmeez
    Author

    Yes, the PR in 163 fixes the issue and is identical to the PR in 164. Thanks.

  6. argiepiano commented on Apr 15, 2026

    @argiepiano
    Collaborator

    Thanks. Merging

  7. added a commit that references this issue on Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions