Skip to content

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

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions